qmm.ab.archives module

class qmm.ab.archives.ABCArchiveInstance(archive_name, file_list)[source]

Bases: abc.ABC

all_ignored

Value is True if all files of the archive are of status FILE_IGNORED.

all_matching

Return True if all files in the archive matches on the drive.

ar_type = None
conflicts()[source]

Yield FileMetadata of conflicting entries of the archive.

files(exclude_directories=False) → Generator[qmm.bucket.FileMetadata, None, None][source]
find(fmd)[source]

Return a FileMetadata object if managed by the archive.

The comparison is done on path and crc, not origin.

Parameters:fmd (FileMetadata) – a FileMetadata object
find_metadata_by_path(path)[source]
folders() → Generator[qmm.bucket.FileMetadata, None, None][source]

Yield folders present in the archive.

get_status(file)[source]
has_conflicts

Value is True if conflicts exists for this archive.

has_ignored

Value is True if a file of the archive is of status FILE_IGNORED.

has_matched

Return True if a file of the archive is of status FILE_MATCHED.

has_mismatched

Value is True if a file of the archive is of status FILE_MISMATCHED.

has_missing

Value is True if a file of the archive is of status FILE_MISSING.

ignored() → Iterable[qmm.bucket.FileMetadata][source]

Yield file metadata of ignored entries of the archive.

install_info()[source]
matched() → Generator[qmm.bucket.FileMetadata, None, None][source]

Yield file metadata of matched entries of the archive.

mismatched() → Generator[qmm.bucket.FileMetadata, None, None][source]

Yield file metadata of mismatched entries of the archive.

missing() → Generator[qmm.bucket.FileMetadata, None, None][source]

Yield file metadata of missing entries of the archive.

reset_conflicts()[source]
reset_status()[source]

Called whenever the state of an archive becomes dirty, which is also the default state.

Populate ‘self._meta’ with tuples containing the ‘FileMetadata’ object of each individual file alongside the current status of that file. The status can be either FILE_MATCHED, FILE_MISMATCHED, FILE_IGNORED or FILE_MISSING.

status() → Generator[Tuple[qmm.bucket.FileMetadata, int], None, None][source]
uninstall_info()[source]

Informations necessary to the uninstall function.

class qmm.ab.archives.ArchiveType[source]

Bases: enum.IntEnum

An enumeration.

FILE = 1
VIRTUAL = 2