gpf_entrepot_toolbelt.utils.archive_utils module¶
- gpf_entrepot_toolbelt.utils.archive_utils.compress_archive(input_dir_path: Path, archive_file: Path) Status ¶
Handle the normalized results by compressing them into an archive or copying them.
- Paramètres:
input_dir_path (Path) – Path to the directory containing the normalized results.
archive_file (Path) – Path to the archive to create
- Returns
Status: The status of the compression process
- gpf_entrepot_toolbelt.utils.archive_utils.extract_archive(archive_file: Path, output_dir_path: Path) Status ¶
Extract the archive file to the specified folder.
- Paramètres:
archive_file (Path) – Path of the archive file.
output_dir_path (Path) – Folder where the archive file will be extracted.
- Renvoie:
The status of the extraction process
- Type renvoyé:
- gpf_entrepot_toolbelt.utils.archive_utils.get_archive_extension(archive_path: Path) str | None ¶
Get the archive extension of a path based on its name.
- Paramètres:
archive_path (Path) – the path to check.
- Renvoie:
The archive extension, e.g., “zip”, “tar.gz”, “7zip”, “7z”, or “tar” None: if the extension is not recognized
- Type renvoyé:
str