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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_info(self,
encoding,
errors)
Return the TarInfo's attributes as a dictionary. |
source code
|
|
|
|
tobuf(self,
format=1,
encoding='UTF-8',
errors='strict')
Return a tar header as a string of 512 byte blocks. |
source code
|
|
|
|
create_ustar_header(self,
info)
Return the object as a ustar header block. |
source code
|
|
|
|
create_gnu_header(self,
info)
Return the object as a GNU header block sequence. |
source code
|
|
|
|
|
|
|
_posix_split_name(self,
name)
Split a name longer than 100 chars into a prefix and a name part. |
source code
|
|
|
|
_proc_member(self,
tarfile)
Choose the right processing method depending on the type and call it. |
source code
|
|
|
|
_proc_builtin(self,
tarfile)
Process a builtin type or an unknown type which will be treated as a
regular file. |
source code
|
|
|
|
_proc_gnulong(self,
tarfile)
Process the blocks that hold a GNU longname or longlink member. |
source code
|
|
|
|
_proc_sparse(self,
tarfile)
Process a GNU sparse header plus extra headers. |
source code
|
|
|
|
_proc_pax(self,
tarfile)
Process an extended or global header as described in POSIX.1-2001. |
source code
|
|
|
|
_apply_pax_info(self,
pax_headers,
encoding,
errors)
Replace fields with supplemental information from a previous pax
extended or global header. |
source code
|
|
|
|
_block(self,
count)
Round up a byte count by BLOCKSIZE and return it, e.g. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|
|
|
create_pax_global_header(cls,
pax_headers)
Return the object as a pax global header block sequence. |
source code
|
|
|
|
_create_gnu_long_header(cls,
name,
type)
Return a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence for name. |
source code
|
|
|
|
|
|
|
frombuf(cls,
buf)
Construct a TarInfo object from a 512 byte string buffer. |
source code
|
|
|
|
fromtarfile(cls,
tarfile)
Return the next TarInfo object from TarFile object tarfile. |
source code
|
|