PyDocs

Nav

Data Compression and Archiving

TarFile.gettarinfo

tarfile

method of TarFile (source)
  • 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 the 'name' attribute of
'fileobj', or the 'name' argument. The name should be a text
string.
Changed in 3.6
  • 3.6: The name parameter accepts a path-like object.
0 Examples
No examples for tarfile/TarFile.gettarinfo.
See Also
No see-alsos for tarfile/TarFile.gettarinfo
0 Notes
No notes for TarFile.gettarinfo