IPWorks SSH 2020 Android Edition

Questions / Feedback?

Transfer Event

Fired during file download/upload.

Syntax

public class DefaultSshplexEventListener implements SshplexEventListener {
  ...
  public void transfer(SshplexTransferEvent e) {}
  ...
}

public class SshplexTransferEvent {
  public String operationId;
  public int direction;
  public String localFile;
  public String remoteFile;
  public String remotePath;
  public long bytesTransferred;
  public int percentDone;
  public byte[] text;
  public boolean cancel;
}

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 Android Edition - Version 20.0 [Build 8501]