public void download(String serverPath, String localPath) { myScp = new Scp(ftpAdr, user, password); myScp.Connect(22); myScp.Get(serverPath, localPath); myScp.Close(); }
/// <summary> /// Receive the data from the source. /// </summary> /// <param name="sourcePath">The source path.</param> /// <param name="destinationPath">The destination path.</param> public void Get(string sourcePath, string destinationPath) { if (_scp.Connected) { // Receive the data. _scp.Get(sourcePath, destinationPath); } else { throw new Exception("An active connection does not exist."); } }