Package duplicity :: Module diffdir :: Class FileWithSignature
[hide private]
[frames] | no frames]

Class FileWithSignature

source code

File-like object which also computes signature as it is read

Instance Methods [hide private]
 
__init__(self, infile, callback, filelen, *extra_args)
FileTee initializer
source code
 
close(self) source code
 
read(self, length=-1) source code
Class Variables [hide private]
  blocksize = 32768
Method Details [hide private]

__init__(self, infile, callback, filelen, *extra_args)
(Constructor)

source code 

FileTee initializer

The object will act like infile, but whenever it is read it add infile's data to a SigGenerator object. When the file has been read to the end the callback will be called with the calculated signature, and any extra_args if given.

filelen is used to calculate the block size of the signature.