diff --git a/src/Renci.SshNet/ISftpClient.cs b/src/Renci.SshNet/ISftpClient.cs index b1212cfea..8954793a4 100644 --- a/src/Renci.SshNet/ISftpClient.cs +++ b/src/Renci.SshNet/ISftpClient.cs @@ -668,6 +668,28 @@ public interface ISftpClient /// The method was called after the client was disposed. IEnumerable ListDirectory(string path, Action listCallback = null); + /// + /// Enumerates files and directories in remote directory. + /// + /// + /// This method differs to in the way how the items are returned. + /// It yields the items to the last moment for the enumerator to decide if it needs to continue or stop enumerating the items. + /// It is handy in case of really huge directory contents at remote server - meaning really huge 65 thousand files and more. + /// It also decrease the memory footprint and avoids LOH allocation as happen per call to method. + /// There aren't asynchronous counterpart methods to this because enumerating should happen in your specific asynchronous block. + /// + /// The path. + /// The list callback. + /// + /// An of files and directories ready to be enumerated. + /// + /// is null. + /// Client is not connected. + /// Permission to list the contents of the directory was denied by the remote host. -or- A SSH command was denied by the server. + /// A SSH error where is the message from the remote host. + /// The method was called after the client was disposed. + IEnumerable EnumerateDirectory(string path, Action listCallback = null); + /// /// Opens a on the specified path with read/write access. ///