PyDocs

Nav

Data Compression and Archiving

TarFile.addfile

tarfile

method of TarFile (source)
  • TarFile.addfile(tarinfo, fileobj=None)
Add the TarInfo object 'tarinfo' to the archive.

If 'tarinfo' represents a non zero-size regular file, the 'fileobj'
argument should be a binary file, and tarinfo.size bytes are read
from it and added to the archive. You can create TarInfo objects
directly, or by using gettarinfo().
Changed in 3.13
  • 3.13: fileobj must be given for non-zero-sized regular files.
0 Examples
No examples for tarfile/TarFile.addfile.
See Also
No see-alsos for tarfile/TarFile.addfile
0 Notes
No notes for TarFile.addfile