damast.utils.io#

Attributes#

Classes#

Archive

Class to wrap and extract archive objects using ratarmount

Module Contents#

damast.utils.io.DAMAST_ARCHIVE_SUPPORT_AVAILABLE = False#
damast.utils.io.DAMAST_ARCHIVE_SUPPORT_AVAILABLE = True#
damast.utils.io.logger#
class damast.utils.io.Archive(filenames: list[str], filter_fn: Callable[[str], bool] | None = None)#

Class to wrap and extract archive objects using ratarmount

filenames: list[str]#
filter_fn: Callable[[str], bool]#
_extracted_files: list[str]#
_mounted_dirs: list[pathlib.Path]#
_supported_suffixes: ClassVar[list[str]] = None#
classmethod supported_suffixes()#

Get the list of suffixes for archives and compressed files which are supported

__enter__() list[str]#

Enter function for the contextmanager

__exit__(exc_type, exc_val, exc_tb)#

Exit function for the contextmanager

ratarmount(file, target)#

Call ratarmount to mount and archive

umount()#

Umount the archive

mount() list[str]#

Mount the archive (and potentially) inner archives to make the files accessible

files()#