EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ElSimpleSftpClient -- Complete download event

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#15770
Posted: 02/15/2011 18:21:40
by Purchase Dept (Standard support level)
Joined: 07/02/2010
Posts: 5

Hi,

I am using the (.NET) ElSimpleSFTPClient's DownloadFiles() method; and I try to find the event tells the app that a file and the file anme has been downloaded completely.

Code
  
event TSBProgressEvent OnProgress;
    delegate void TSBProgressEvent(object Sender, long Total, long Current, ref bool Cancel)


The most close event I can find is OnProgress. But I am not sure will it be fired when 100% received, and I still need to know the file name. I have no idea what files will be download, that's why I am using the DownloadFiles().

Thanks for the help.

Duncan
#15771
Posted: 02/16/2011 01:18:46
by Eugene Mayevski (EldoS Corp.)

You need OnFileOperation and OnFileOperationResult events. They were added relatively recently, so your license probably needs upgrading.


Sincerely yours
Eugene Mayevski
#15971
Posted: 03/03/2011 17:01:03
by Purchase Dept (Standard support level)
Joined: 07/02/2010
Posts: 5

Eugene,

I find a work around for now. That is I will scan the local directory first, and the scan the directory again, before and after calling DownloadFiles() method. So I can know the newly added files.

The problem is how do I know that added files were fully downloaded. I ran into problem that a just partially downloaded. Is there a way I can tell before upgrading the lib? Or can the ElSimpleSFTPClient will save the downloading file to a temp file or temp location and only make it available when complete? Thx

Duncan
#15972
Posted: 03/03/2011 17:43:11
by Purchase Dept (Standard support level)
Joined: 07/02/2010
Posts: 5

Eugene,

I just notice the version I have does support event

Code

void SftpClient_OnFileOperation(object Sender, string RemotePath, string LocalPath, ref bool Skip, ref bool Cancel)
      


However, I assume this only gets triggered when download started, right?

Duncan
#15973
Posted: 03/03/2011 23:25:30
by Eugene Mayevski (EldoS Corp.)

You need OnFileOperationResult event. Or use DownloadStream method and write the method, similar to DownloadFiles, yourself.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 1464 times

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




|

Back to top

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

Got it!