The DownloadFile()
function requires 3 arguments, but 2 are used absolutely everywhere on the Internet.
And when I also use 2 arguments, I get the following error: No overload for method 'DownloadFile' takes '2' arguments
.
Here is an example of use: link
Here is my code:
using (var sftp = new SftpClient(Host, Port, Username, Password)) { sftp.Connect(); using (var file = File.OpenWrite(LocalDestinationFilename)) { sftp.DownloadFile(RemoteFileName, file); //ошибкатут } sftp.Disconnect(); }
public void DownloadFile(string path, Stream output, Action<ulong> downloadCallback = null)
Ie should and with two let - BOPOH