b2sdk.scan.scan

b2sdk.scan.scan.zip_folders(folder_a: ~b2sdk.scan.folder.AbstractFolder, folder_b: ~b2sdk.scan.folder.AbstractFolder, reporter: ~b2sdk.scan.report.ProgressReport, policies_manager: ~b2sdk.scan.policies.ScanPoliciesManager = <b2sdk.scan.policies.ScanPoliciesManager object>) Tuple[Optional[AbstractPath], Optional[AbstractPath]][source]

Iterate over all of the files in the union of two folders, matching file names.

Each item is a pair (file_a, file_b) with the corresponding file in both folders. Either file (but not both) will be None if the file is in only one folder.

Parameters:
Returns:

yields two element tuples

class b2sdk.scan.scan.AbstractScanResult[source]

Bases: object

Some attributes of files which are meaningful for monitoring and troubleshooting.

abstract classmethod from_files(*files: Optional[AbstractPath]) AbstractScanResult[source]
__init__() None
class b2sdk.scan.scan.AbstractScanReport[source]

Bases: object

Aggregation of valuable information about files after scanning.

SCAN_RESULT_CLASS

alias of AbstractScanResult

abstract add(*files: Optional[AbstractPath]) None[source]
__init__() None
class b2sdk.scan.scan.CountAndSampleScanReport(counter_by_status: ~collections.Counter = <factory>, samples_by_status_first: ~typing.Dict[~b2sdk.scan.scan.AbstractScanResult, ~typing.Tuple[~b2sdk.file_version.FileVersion, ...]] = <factory>, samples_by_status_last: ~typing.Dict[~b2sdk.scan.scan.AbstractScanResult, ~typing.Tuple[~b2sdk.file_version.FileVersion, ...]] = <factory>)[source]

Bases: AbstractScanReport

Scan report which groups and counts files by their AbstractScanResult and also stores first and last seen examples of such files.

counter_by_status: Counter
samples_by_status_first: Dict[AbstractScanResult, Tuple[FileVersion, ...]]
samples_by_status_last: Dict[AbstractScanResult, Tuple[FileVersion, ...]]
add(*files: Optional[AbstractPath]) None[source]
__init__(counter_by_status: ~collections.Counter = <factory>, samples_by_status_first: ~typing.Dict[~b2sdk.scan.scan.AbstractScanResult, ~typing.Tuple[~b2sdk.file_version.FileVersion, ...]] = <factory>, samples_by_status_last: ~typing.Dict[~b2sdk.scan.scan.AbstractScanResult, ~typing.Tuple[~b2sdk.file_version.FileVersion, ...]] = <factory>) None