Class to compress and uncompress tar file.
:return: description :rtype: type
Attributes
compress_option: str
destination_file_path: str
tar_file: TarFile
Functions
Initialize self. See help(type(self)) for accurate signature.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
destination_file_path | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
dir_path | str | ||
dir_name | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_path | str | ||
file_name | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
fs_node_path | str | ||
fs_node_name | str |
Return type:
str |
Return true if the file can be uncompressed by this class
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_path | str |
Return type:
bool |
Compress a folder into a tar.gz file.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
dir_path | str | ||
destination_file_path | str | Path of the tar.gz file to create `` |
Uncompress a tar.gz file.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_path | str | ||
destination_folder | str |
Return the list of supported extensions
Return type:
set |
Return the list of all supported extensions without '.'
Return type:
Set |
Check if the file is a compressed file.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_path | str |
Return type:
bool |
Detect the extension of the compressed file and use the right decompress method.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_path | str | ||
destination_folder | str |