Package duplicity :: Module tarfile :: Class _FileObject
[hide private]
[frames] | no frames]

Class _FileObject

source code

File-like object for reading an archive member, is returned by TarFile.extractfile(). Support for sparse files included.

Instance Methods [hide private]
 
__init__(self, tarfile, tarinfo) source code
 
readline(self, size=-1)
Read a line with approx.
source code
 
readlines(self)
Return a list with all (following) lines.
source code
 
_readnormal(self, size=None)
Read operation for regular files.
source code
 
_readsparse(self, size=None)
Read operation for sparse files.
source code
 
_readsparsesection(self, size)
Read a single section of a sparse file.
source code
 
tell(self)
Return the current file position.
source code
 
seek(self, pos, whence=0)
Seek to a position in the file.
source code
 
close(self)
Close the file object.
source code
Method Details [hide private]

readline(self, size=-1)

source code 

Read a line with approx. size. If size is negative, read a whole line. readline() and read() must not be mixed up (!).