Mutablezip Index / Mutablezip
Auto-generated documentation for mutablezip module.
Add delete (via remove_file) and update (via writestr and write methods) To enable update features use MutableZipFile with the 'with statement', Upon exit (if updates were applied) a new zip file will override the exiting one with the updates.
class MutableZipFile(ZipFile):
def __init__(
self,
file: str | IO[bytes],
mode: Literal["r", "w", "x", "a"] = "r",
compression: int = ZIP_STORED,
allowZip64: bool = False,
) -> None: ...
Close all temporary files.
def _closeAllTempFiles(self) -> None: ...
Flag a file with a delete marker.
def removeFile(self, path: str | PathLike[str]) -> None: ...
def write(
self,
filename: str | PathLike[str],
arcname: str | PathLike[str] | None = None,
compress_type: int | None = None,
compresslevel: int | None = None,
) -> None: ...
def writestr(
self,
zinfo_or_arcname: str | ZipInfo,
data: bytes | str,
compress_type: int | None = None,
compresslevel: int | None = None,
) -> None: ...