We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b97016f commit 91a421eCopy full SHA for 91a421e
Doc/library/zipfile.rst
@@ -84,6 +84,18 @@ The module defines the following items:
84
formerly protected :attr:`!_compresslevel`. The older protected name
85
continues to work as a property for backwards compatibility.
86
87
+
88
+ .. classmethod:: for_name(filename, archive, *, date_time=None)
89
90
+ Construct an appropriate :class:`ZipInfo` from a *filename*,
91
+ a :class:`ZipFile` archive and an optional *date_time*.
92
93
+ If *date_time* is not specified, the current local time is used
94
+ instead, namely ``date_time = time.localtime(time.time())[:6]``.
95
96
+ .. versionadded:: 3.14
97
98
99
.. function:: is_zipfile(filename)
100
101
Returns ``True`` if *filename* is a valid ZIP file based on its magic number,
0 commit comments