summaryrefslogtreecommitdiffstats
path: root/Doc/library/zipfile.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/zipfile.rst')
-rw-r--r--Doc/library/zipfile.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index bfcc883..d6a1fce 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -478,6 +478,17 @@ ZipFile Objects
a closed ZipFile will raise a :exc:`ValueError`. Previously,
a :exc:`RuntimeError` was raised.
+.. method:: ZipFile.mkdir(zinfo_or_directory, mode=511)
+
+ Create a directory inside the archive. If *zinfo_or_directory* is a string,
+ a directory is created inside the archive with the mode that is specified in
+ the *mode* argument. If, however, *zinfo_or_directory* is
+ a :class:`ZipInfo` instance then the *mode* argument is ignored.
+
+ The archive must be opened with mode ``'w'``, ``'x'`` or ``'a'``.
+
+ .. versionadded:: 3.11
+
The following data attributes are also available: