f_lib.archive_extractor package¶
Archive extractors.
- class f_lib.archive_extractor.ArchiveExtractor[source]¶
Bases:
ABCAbstract base class for archive extractors.
- __init__(archive: Path | str, *, strict: bool = True) None[source]¶
Instantiate class.
- Parameters:
archive – Path to the archive file.
strict – Raise an error if the provided archive file does not have the expected file extension/suffix.
- classmethod can_extract(archive: Path | str) bool[source]¶
Determine if the extractor can attempt to extract the file.
- Parameters:
archive – Path to an archive file.
- class f_lib.archive_extractor.TarExtractor[source]¶
Bases:
ArchiveExtractorExtractor for
.tararchives.Supports bz2, gz, and xz compression types.
- class f_lib.archive_extractor.ZipExtractor[source]¶
Bases:
ArchiveExtractorExtractor for
.ziparchives.