FileOperationResult Event
Signifies the completion of a file transfer operation.
Syntax
public event OnFileOperationResultHandler OnFileOperationResult; public delegate void OnFileOperationResultHandler(object sender, SftpclientFileOperationResultEventArgs e); public class SftpclientFileOperationResultEventArgs : EventArgs { public int Operation { get; } public string RemotePath { get; } public string LocalPath { get; } public int ErrorCode { get; } public string Comment { get; } public bool Cancel { get; set; } }
Public Event OnFileOperationResult As OnFileOperationResultHandler Public Delegate Sub OnFileOperationResultHandler(sender As Object, e As SftpclientFileOperationResultEventArgs) Public Class SftpclientFileOperationResultEventArgs Inherits EventArgs Public ReadOnly Property Operation As Integer Public ReadOnly Property RemotePath As String Public ReadOnly Property LocalPath As String Public ReadOnly Property ErrorCode As Integer Public ReadOnly Property Comment As String Public Property Cancel As Boolean End Class
Remarks
This event is fired each time the component completes a file transfer within a multi-file call. Operation defines the operation performed on the file, RemotePath specifies the name and path to the remote file, and LocalPath specifies the name and path to the local file.
ErrorCode and Comment return the code and textual description of the error, if it was encountered.
Set Cancel to True to cancel the multi-file operation.
Supported operations:
csfoDownloadFile | 0 | Download file |
csfoUploadFile | 1 | Upload file |
csfoDeleteFile | 2 | Delete file |
csfoMakeDir | 3 | Make directory |