When a transfer is interrupted due to a disconnected connection or user abortion, files that are still in transfer progress may be incomplete. Instead of transferring them all again, you can resume transferring the missing parts of the incomplete files only. By specifying FileOverwriteMode.ResumeFileTransfer as the action on existing files, the Upload and Download methods can do this automatically. The library will do the following:
// Create a new instance of the Ftp class. using (Ftp client = new Ftp()) { // Connect to the server. client.Connect(serverName); // Authenticate the user client.Authenticate(userName, password); // Resume upload files. client.Upload(@"c:\data", "/data", true, FileOverwriteMode.ResumeFileTransfer); // Resume download "*.dat" and "*.txt" files. client.Download("/data/*.dat;*.txt", @"c:\data", true, FileOverwriteMode.ResumeFileTransfer); }