on_file_operation_result Event
Reports the result of a file transfer operation.
Syntax
class FTPClientFileOperationResultEventParams(object): @property def operation() -> int: ... @property def remote_path() -> str: ... @property def local_path() -> str: ... @property def error_code() -> int: ... @property def comment() -> str: ... @property def cancel() -> bool: ... @cancel.setter def cancel(value) -> None: ... # In class FTPClient: @property def on_file_operation_result() -> Callable[[FTPClientFileOperationResultEventParams], None]: ... @on_file_operation_result.setter def on_file_operation_result(event_hook: Callable[[FTPClientFileOperationResultEventParams], None]) -> None: ...
Remarks
The class fires this event from download_files and upload_files to notify the application of the completion of a file operation.
ErrorCode and Comment provide the details of the operation. Use the Cancel parameter to terminate the whole multi-file operation if needed.
Operations:
cffoDownloadFile | 0 | Download file |
cffoUploadFile | 1 | Upload file |
cffoDeleteFile | 2 | Delete file |
cffoMakeDir | 3 | Make directory |