Hi,
Does ScSFTPClient support resume upload and download?
Regards.
SFTP resume upload/download
Re: SFTP resume upload/download
To implement resume of upload or download, you should do the following steps:
1. Establish SFTP connection using the TScSFTPClient.Initialize method.
2. Open a remote file by the OpenFile method.
3. Read the needed amount of data using the ReadFile method in loop until file download is completed.
4. If while reading the file data an exception is raised, keep the count of the read data.
5. After handling the exception you should start the downloading process again, but you should start reading data from the last part of unread data. For this you should pass the appropriate file offset in the ReadFile method as the FileOffset parameter.
1. Establish SFTP connection using the TScSFTPClient.Initialize method.
2. Open a remote file by the OpenFile method.
3. Read the needed amount of data using the ReadFile method in loop until file download is completed.
4. If while reading the file data an exception is raised, keep the count of the read data.
5. After handling the exception you should start the downloading process again, but you should start reading data from the last part of unread data. For this you should pass the appropriate file offset in the ReadFile method as the FileOffset parameter.
Re: SFTP resume upload/download
Thank you for the information.
Will try this out.
Will try this out.
Re: SFTP resume upload/download
If any questions come up, please contact me.