PyDocs

Nav

Data Compression and Archiving

ZipInfo.from_file

zipfile

classmethod of ZipInfo · Added in 3.6 (source)
  • ZipInfo.from_file(filename, arcname=None, *, strict_timestamps=True)
Construct an appropriate ZipInfo for a file on the filesystem.

filename should be the path to a file or directory on the
filesystem.

arcname is the name which it will have within the archive (by
default, this will be the same as filename, but without a drive
letter and with leading path separators removed).
Changed in 3.6.2, 3.8
  • 3.6.2: The filename parameter accepts a path-like object.
  • 3.8: Added the strict_timestamps keyword-only parameter.
0 Examples
No examples for zipfile/ZipInfo.from_file.
See Also
No see-alsos for zipfile/ZipInfo.from_file
0 Notes
No notes for ZipInfo.from_file