diff --git a/src/Renci.SshNet/ISftpClient.cs b/src/Renci.SshNet/ISftpClient.cs index d3c4b3b6a..2c37bbcbe 100644 --- a/src/Renci.SshNet/ISftpClient.cs +++ b/src/Renci.SshNet/ISftpClient.cs @@ -630,6 +630,22 @@ public interface ISftpClient : IBaseClient /// The method was called after the client was disposed. bool Exists(string path); + /// + /// Checks whether file or directory exists. + /// + /// The path. + /// The to observe. + /// + /// A that represents the exists operation. + /// The task result contains if directory or file exists; otherwise . + /// + /// is or contains only whitespace characters. + /// Client is not connected. + /// Permission to perform the operation 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. + Task ExistsAsync(string path, CancellationToken cancellationToken = default); + /// /// Gets reference to remote file or directory. /// @@ -643,6 +659,21 @@ public interface ISftpClient : IBaseClient /// The method was called after the client was disposed. ISftpFile Get(string path); + /// + /// Gets reference to remote file or directory. + /// + /// The path. + /// The to observe. + /// + /// A that represents the get operation. + /// The task result contains the reference to file object. + /// + /// Client is not connected. + /// was not found on the remote host. + /// is . + /// The method was called after the client was disposed. + Task GetAsync(string path, CancellationToken cancellationToken); + /// /// Gets the of the file on the path. ///