EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP Client Download and Delete

Posted: 12/03/2012 11:51:42
by Dylan Hall (Basic support level)
Joined: 12/03/2012
Posts: 2


I have created code using the the Simple SFTP Client that lists the contents of a remote directory and then downloads the files (I am using TElSimpleSFTPClient.DownloadStream). I would like to safely remove these files from the remote server once I am done downloading.
I guess I can check for errors or check the files downloaded against the files listed, then delete. However, I was wondering if there is an event that I can subscribe to that would indicate if the file transfer is complete and successful? Are there any code samples that illustrate this?

Posted: 12/03/2012 11:57:38
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

There is not such event but if any operation completes without exceptions and TElSimpleSFTPClient.OnError is not fired then you can interpret this as a successful operation.
Posted: 12/03/2012 11:58:14
by Eugene Mayevski (Team)

In TElSimpleSFTPClient all methods are synchronous and when execution returns from that methods, those methods are done (i.e. the operation is completed successfully). Errors are either thrown as exceptions or reported via OnError event (depending on error type - there's a reason for error handling to work this way).

Sincerely yours
Eugene Mayevski
Posted: 12/03/2012 12:38:49
by Dylan Hall (Basic support level)
Joined: 12/03/2012
Posts: 2

Thank you both for your answers.




Topic viewed 865 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!