ZipCompress
Class to zip and unzip files and folders using system zip / unzip.
Entries are staged as symlinks in a temp directory so arcnames can be customized without copying data, then archived in a single invocation.
destination_file_path: strsupports_multiple_entries: boolInitialize the compressor with the path of the archive to create.
strbool - FalseAdd a directory (recursively) to the archive.
strstr | NoneAdd the content of dir_path at the archive root.
Each top-level entry inside dir_path is added under its own name, so
the resulting archive does not contain dir_path itself as a wrapping
folder.
strAdd a single file to the archive.
strstr | NoneAdd a filesystem node (file or directory) to the archive.
Dispatches to :meth:add_dir or :meth:add_file based on the node type.
strstr | NoneFinalize the archive and write it to destination_file_path.
Must be called once all entries have been added.
strReturn true if the file can be uncompressed by this class
strboolCompress a folder into a tar.gz file.
strstrCompress the content of a folder without creating a subfolder hierarchy. Files and folders inside dir_path will be at the root of the compressed file.
strstrUnzip a file into destination_folder.
strstrReturn the list of supported extensions
setReturn the list of all supported extensions without '.'
setReturn a mapping of supported extension (without leading dot) to its Compress class. Built dynamically from child classes so new compressors are picked up automatically.
bool - FalsedictCheck if the file is a compressed file.
strboolValidate and normalize an archive entry name to a safe relative path.
Rejects empty names, absolute paths, and any segment that would escape
the archive root via ... Returned value is suitable for joining
with a staging directory.
strstrDetect the extension of the compressed file and use the right decompress method.
strstr