FileOperation Event
Signifies the start of a file transfer operation.
Syntax
sftpclient.on('FileOperation', [callback])
Callback
The 'callback' is called when the 'FileOperation' event is emited.
function(e){ }
The argument 'e' has the following properties:
e.operation e.remotePath e.localPath e.skip e.cancel
Remarks
This event is fired each time the class starts an upload or download operation within a multi-file call. Operation defines the operation about to start, RemotePath specifies the name and path to the remote file, and LocalPath specifies the name and path to the local file.
If needed, set Skip to true to ignore the current file, or Cancel to abort the whole batch.
Supported operations:
csfoDownloadFile | 0 | Download file |
csfoUploadFile | 1 | Upload file |
csfoDeleteFile | 2 | Delete file |
csfoMakeDir | 3 | Make directory |