Hello,
I have problem when trying resume downloading file.
The problem is file isn't appending correctly.
As result I have file bigger than original.
It seems that files concatenates (not appends).
See my code below.
//_ftpConnection - SecureFTPConnection
//ftpFileName - path to file located on FTP server
//localFileName - path for downloading file
FileStream localFileStream = null;
if (File.Exists(localFileName))
{
localFileStream = File.Open(localFileName, FileMode.Append, FileAccess.Write);
}
else
{
localFileStream = new FileStream(localFileName, FileMode.CreateNew, FileAccess.Write);
}
_ftpConnection.ResumeTransfer();
_ftpConnection.DownloadStream(localFileStream, ftpFileName);
localFileStream.Close();
Thanks for your help.