Back to bricks list
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

ZipCompress

Class to zip and unzip files and folders

Attributes
destination_file_path: strzipf: ZipFile
Functions
__INIT__

Initialize self. See help(type(self)) for accurate signature.

destination_file_path : str
ADD_DIR
dir_path : str
dir_name : str
ADD_FILE
file_path : str
file_name : str
ADD_FS_NODE
fs_node_path : str
fs_node_name : str
CLOSE
Return type : str
CAN_UNCOMPRESS_FILE - @classmethod

Return true if the file can be uncompressed by this class

file_path : str
Return type : bool
COMPRESS_DIR - @classmethod

Compress a folder into a tar.gz file.

dir_path : str
destination_file_path : str
Path of the tar.gz file to create
DECOMPRESS - @classmethod

Unzip a file.

file_path : str
destination_folder : str
GET_SUPPORTED_EXTENSIONS - @classmethod

Return the list of supported extensions

Return type : set
GET_ALL_SUPPORTED_EXTENSIONS - @staticmethod

Return the list of all supported extensions without '.'

Return type : Set
IS_COMPRESSED_FILE - @staticmethod

Check if the file is a compressed file.

file_path : str
Return type : bool
SMART_DECOMPRESS - @staticmethod

Detect the extension of the compressed file and use the right decompress method.

file_path : str
destination_folder : str