Blocking - WeOnlyDo Discussion board

Blocking (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Jason, Wednesday, November 17, 2004, 20:21 (7102 days ago)

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?

Re: Blocking

by wodSupport, Thursday, November 18, 2004, 00:18 (7102 days ago) @ Jason

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.

Re: Blocking

by Jason, Thursday, November 18, 2004, 13:43 (7101 days ago) @ wodSupport

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.

Re: Blocking

by wodSupport, Thursday, November 18, 2004, 13:46 (7101 days ago) @ Jason

Jason,

agreed. BTW if you need it only for ListItemsEvent, perhaps ListItem property could help?

Re: Blocking

by Jason, Thursday, November 18, 2004, 14:28 (7101 days ago) @ wodSupport

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.

Re: Blocking

by wodSupport, Thursday, November 18, 2004, 14:30 (7101 days ago) @ Jason

Jason,

yes, everything.