On this code example:
public void DownloadFile()
{
string host = "";
string username = "";
string password = "";
string localFileName = System.IO.Path.GetFileName(localFile);
string remoteFileName = "";
using (var sftp = new SftpClient(host, username, password))
{
sftp.Connect();
using (var file = File.OpenWrite(localFileName))
{
sftp.DownloadFile(remoteFileName, file);
}
sftp.Disconnect();
}
}
Isn't the method ".DownloadFile" with the parameters switched? Since the first one is a string and the other is a Stream?
Shouldn't it be the other way around?
Never mind, I was looking at .UpdateFile. Sorry.