FindNext Event
This event retrieves the next entry of a custom file listing.
Syntax
public event OnFindNextHandler OnFindNext; public delegate void OnFindNextHandler(object sender, SftpserverFindNextEventArgs e); public class SftpserverFindNextEventArgs : EventArgs { public long ConnectionID { get; } public string Handle { get; } public int OperationStatus { get; set; } }
Public Event OnFindNext As OnFindNextHandler Public Delegate Sub OnFindNextHandler(sender As Object, e As SftpserverFindNextEventArgs) Public Class SftpserverFindNextEventArgs Inherits EventArgs Public ReadOnly Property ConnectionID As Long Public ReadOnly Property Handle As String Public Property OperationStatus As Integer End Class
Remarks
This event is fired repeatedly after FindFirst to retrieve the directory contents entry-by-entry. Please see the FindFirst topic for more details about implementing a handler of this event.
Remember to set OperationStatus to ostEOF when there are no more entries left to close the listing operation. If there are more entries to pass, set it to ostOK. Other possible values are given in the table below:
ostOk | 1 | |
ostNoSuchFile | 2 | |
ostAccessDenied | 3 | |
ostWriteProtect | 4 | |
ostUnsupported | 5 | |
ostInvalidParameter | 6 | |
ostEOF | 7 |