FileOperation Event
Signifies the start of a file transfer operation.
Syntax
public event OnFileOperationHandler OnFileOperation; public delegate void OnFileOperationHandler(object sender, SftpclientFileOperationEventArgs e); public class SftpclientFileOperationEventArgs : EventArgs { public int Operation { get; } public string RemotePath { get; } public string LocalPath { get; } public bool Skip { get; set; } public bool Cancel { get; set; } }
Public Event OnFileOperation As OnFileOperationHandler Public Delegate Sub OnFileOperationHandler(sender As Object, e As SftpclientFileOperationEventArgs) Public Class SftpclientFileOperationEventArgs Inherits EventArgs Public ReadOnly Property Operation As Integer Public ReadOnly Property RemotePath As String Public ReadOnly Property LocalPath As String Public Property Skip As Boolean Public Property Cancel As Boolean End Class
Remarks
This event is fired each time the component 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 |