Hello,
no, actually the Sftp client does not check whether the partially transferred file is the "right" one when using the basic resume with the PutFile
method.*
For an automatic auto resume please check our MultiFile operation sftp.Upload
which you can instruct to auto-resume via the ActionOnExistingFiles.ResumeIfPossible.
So checking whether the partial file content that you want to resume really corresponds to the local file is up to you. The FTP protocol and Rebex FTP supports computing remote hashsums, which comes in handy in this situation, but the Sftp protocol hashsums are unsupported by many SFTP servers, so we do not support it in Rebex SFTP.
*Example:
So if you have a failed transfer, let's say that 1024B were transferred out of 3KB file ( = OrigFile), and then you start with the resume, count the remote length, but just before you connect to the server and finish the resume, then somebody else changes the remote file and it is now 1050B long with different content ( = DifferentFile).
In fact if you now continue with the original resume from offset 1024, then the bytes from remote offset 1024 will get overwritten and the rest will be appended. So you will enad up having bytes 0-1023 from file 'DifferentFile' and the rest (bytes 1024-3071) from the 'OrigFile'.