/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Robert Collins
  • Date: 2007-09-27 21:11:38 UTC
  • mfrom: (2871 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2879.
  • Revision ID: robertc@robertcollins.net-20070927211138-ebsu1bo1qz9f1w8n
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
554
554
 
555
555
 
556
556
def pumpfile(fromfile, tofile):
557
 
    """Copy contents of one file to another."""
 
557
    """Copy contents of one file to another.
 
558
    
 
559
    :return: The number of bytes copied.
 
560
    """
558
561
    BUFSIZE = 32768
 
562
    length = 0
559
563
    while True:
560
564
        b = fromfile.read(BUFSIZE)
561
565
        if not b:
562
566
            break
563
567
        tofile.write(b)
 
568
        length += len(b)
 
569
    return length
564
570
 
565
571
 
566
572
def file_iterator(input_file, readsize=32768):