File tree Expand file tree Collapse file tree 4 files changed +1251
-0
lines changed Expand file tree Collapse file tree 4 files changed +1251
-0
lines changed Original file line number Diff line number Diff line change @@ -518,6 +518,29 @@ ZipFile Objects
518518 .. versionadded :: 3.11
519519
520520
521+ .. method :: ZipFile.remove(zinfo_or_arcname)
522+
523+ Removes a member from the archive. *zinfo_or_arcname * is either the full
524+ path of the member, or a :class: `ZipInfo ` instance.
525+
526+ The archive must be opened with mode ``'w' ``, ``'x' `` or ``'a' ``.
527+
528+ Calling :meth: `remove ` on a closed ZipFile will raise a :exc: `ValueError `.
529+
530+ .. versionadded :: next
531+
532+
533+ .. method :: ZipFile.repack()
534+
535+ Repack a zip file and physically remove non-referenced file entries.
536+
537+ The archive must be opened with mode ``'a' ``.
538+
539+ Calling :meth: `repack ` on a closed ZipFile will raise a :exc: `ValueError `.
540+
541+ .. versionadded :: next
542+
543+
521544The following data attributes are also available:
522545
523546.. attribute :: ZipFile.filename
You can’t perform that action at this time.
0 commit comments