tarfile.TarInfo.gid

TarInfo.gid Group ID of the user who originally stored this member.

tarfile.TarInfo.fromtarfile()

classmethod TarInfo.fromtarfile(tarfile) Read the next member from the TarFile object tarfile and return it as a TarInfo object.

tarfile.TarInfo.frombuf()

classmethod TarInfo.frombuf(buf, encoding, errors) Create and return a TarInfo object from string buffer buf. Raises HeaderError if the buffer is invalid.

tarfile.TarInfo

class tarfile.TarInfo(name="") Create a TarInfo object.

tarfile.TarFile.pax_headers

TarFile.pax_headers A dictionary containing key-value pairs of pax global headers.

tarfile.TarFile.open()

classmethod TarFile.open(...) Alternative constructor. The tarfile.open() function is actually a shortcut to this classmethod.

tarfile.TarFile.next()

TarFile.next() Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available.

tarfile.TarFile.list()

TarFile.list(verbose=True, *, members=None) Print a table of contents to sys.stdout. If verbose is False, only the names of the members are printed. If it is True, output similar to that of ls -l is produced. If optional members is given, it must be a subset of the list returned by getmembers(). Changed in version 3.5: Added the members parameter.

tarfile.TarFile.gettarinfo()

TarFile.gettarinfo(name=None, arcname=None, fileobj=None) Create a TarInfo object from the result of os.stat() or equivalent on an existing file. The file is either named by name, or specified as a file object fileobj with a file descriptor. If given, arcname specifies an alternative name for the file in the archive, otherwise, the name is taken from fileobj’s name attribute, or the name argument. The name should be a text string. You can modify some of the TarInfo’s attributes before you ad

tarfile.TarFile.getnames()

TarFile.getnames() Return the members as a list of their names. It has the same order as the list returned by getmembers().