IPWorks SSH 2020 macOS Edition

Questions / Feedback?

Transfer Event

Fired during file download/upload.

Syntax

func onTransfer(operationId: String, direction: Int32, localFile: String, remoteFile: String, remotePath: String, bytesTransferred: Int64, percentDone: Int32, text: Data, cancel: inout Bool)

Remarks

This event is fired once per file when it starts downloading/uploading.

OperationId is associated with the operation that fired this event. Direction is 0 for Uploads and 1 for Downloads. LocalFile, RemoteFile, and RemotePath are populated with values of LocalFile, RemoteFile, and RemotePath, respectively, that are associated with the operation that fired this event.

BytesTransferred shows the number of bytes transferred since the beginning of the transfer, and PercentDone contains the percentage (0-100) of bytes transferred based on the Direction being transferred. If PercentDone cannot be calculated the value will be -1.

Text contains the text of the file being transferred.

Setting Cancel to true will cancel the associated operation without firing a DownloadComplete or UploadComplete event. It is not equivalent to calling CancelOperation with the associated OperationId, which will fire the aforementioned events.

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 macOS Edition - Version 20.0 [Build 8501]