0 votes

Resume download following interruption - do you have examples of this?

by

1 Answer

0 votes

You simply need to use Ftp.Download overload that takes position parameter.

ftp.Download("remote.dat", 10 /* start at 11th byte*/, localStream);

Remember to append to the file you created on disk:

Stream localStream = File.Open("c:\\test.dat", FileMode.Append);

Please note that some FTP servers may not support REST command that
allows clients to resume transfer from specified point.

You may get error message in such case. You can use Ftp.Supports(FtpExtension.Rest) to check, if your server returns REST in its capability list.

by (297k points)
...