Skip to content

Engine

Engine Module.

Classes:

Name Description
Engine

Core engine class.

Engine(root: str, walker: FSWalker, validator: FileValidator, filecount: Filecount, filename: Filename, do_transfer_strategy: Callable[[os.PathLike, str], None], context: Context, folder_count: int) dataclass

Core engine class.

Methods:

Name Description
set_observer

Set the observer for the engine.

request_stop

Request to stop the engine.

start

Run the main file copying process.

get_transfer_parameters

Get transfer parameters for all folders.

process_directory

Run processing for a single folder.

transfer_directory

Process a single folder for file copying.

transfer_file

Attempt to copy a file and return success status.

report_state

Report the current engine state.

report

Report and log a message.

update_observer_on_entry

Update observer with current entry statistics.

set_observer(observer: Observer) -> None

Set the observer for the engine.

request_stop() -> None

Request to stop the engine.

start() -> None

Run the main file copying process.

get_transfer_parameters() -> Iterator[tuple[int, str]]

Get transfer parameters for all folders.

process_directory(target: int, dest: str) -> None

Run processing for a single folder.

transfer_directory(target: int, dest: str) -> None

Process a single folder for file copying.

transfer_file(entry: os.PathLike, dest: str) -> bool

Attempt to copy a file and return success status.

report_state() -> None

Report the current engine state.

report(msg: str) -> None

Report and log a message.

update_observer_on_entry() -> None

Update observer with current entry statistics.