Esempio n. 1
0
 /// <summary>
 /// Opens SFTP channel and creates a new instance.
 /// </summary>
 /// <param name="connection">SSH2 connection object</param>
 /// <returns>New instance.</returns>
 public static SFTPClient OpenSFTPChannel(ISSHConnection connection)
 {
     ISSHChannel channel = null;
     SFTPClientChannelEventHandler eventHandler =
         connection.OpenSubsystem(
             (ch) => {
                 channel = ch;
                 return new SFTPClientChannelEventHandler();
             },
             "sftp"
         );
     return new SFTPClient(channel, eventHandler);
 }