Module tarfile :: Class TarInfo
[hide private]
[frames] | no frames]

type TarInfo

object --+
         |
        TarInfo

Informational class which holds the details about an archive member given by a tar header block. TarInfo objects are returned by TarFile.getmember(), TarFile.getmembers() and TarFile.gettarinfo() and are usually created internally.

Instance Methods [hide private]
 
__init__(self, name='')
Construct a TarInfo object.
 
__repr__(self)
 
tobuf(self, posix=False)
Return a tar header as a string of 512 byte blocks.
 
_create_gnulong(self, name, type)
Create a GNU longname/longlink header from name.
 
isreg(self)
 
isfile(self)
 
isdir(self)
 
issym(self)
 
islnk(self)
 
ischr(self)
 
isblk(self)
 
isfifo(self)
 
issparse(self)
 
isdev(self)
Class Methods [hide private]
 
frombuf(cls, buf)
Construct a TarInfo object from a 512 byte string buffer.
Method Details [hide private]

__init__(self, name='')
(Constructor)

 

Construct a TarInfo object. name is the optional name of the member.

Overrides: object.__init__

__repr__(self)
(Representation operator)

 
Overrides: object.__repr__
(inherited documentation)

_create_gnulong(self, name, type)

 

Create a GNU longname/longlink header from name. It consists of an extended tar header, with the length of the longname as size, followed by data blocks, which contain the longname as a null terminated string.