Class SshExtensions
Renci SSH.NET related extensions.
Namespace: Neon.SSH
Assembly: Neon.SSH.dll
Syntax
public static class SshExtensions
Methods
PathExists(SftpClient, string)
Determines whether a file or directory exists on the remote machine.
Declaration
public static bool PathExists(this SftpClient sftpClient, string path)
Parameters
Type | Name | Description |
---|---|---|
SftpClient | sftpClient | The FTP client. |
string | path | Path to the file or directory. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
The SftpClient.Exists(string) method is supposed to do this but it appears throw exceptions when part of the path doesn't exist. This method calls that but catches and handles the exception.