Blocking (wodSFTP / wodSFTP.NET / wodSFTPdll)
Just a quick question about blocking - Is it alright to mix blocking with SFTP events as long as no other SFTP procedures are called from within those events?
Just a quick question about blocking - Is it alright to mix blocking with SFTP events as long as no other SFTP procedures are called from within those events?
Jason,
I would rather say no, don't mix them but you're right - as long as you don't call blocking methods from within events, you can use both.
Agreed, I normally wouldn't use both, but in a situation where I need to poll several directories and store certain files within those directories into an array (have to use the ListItemsEvent), I have no choice, unless I want to re-write the rest of the code to use events as well. I discovered quickly that using blocking with loops is a lot easier than trying to call a dynamic amount of subsequent downloads/uploads/renames/etc... through the doneEvent.
Jason,
agreed. BTW if you need it only for ListItemsEvent, perhaps ListItem property could help?
Possibly. Does the ListItem property contain all the information that the ListDir method would return? I need to check whether items in a directory are directories or files, along with modification dates, filesizes, and filenames.
Jason,
yes, everything.