LoopItem Event - WeOnlyDo Discussion board

LoopItem Event (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Judgy, Saturday, March 05, 2005, 03:03 (7002 days ago)

Hi,

you have defined the LoopItem event like
Private Sub object_LoopItem(LocalFile, RemoteFile, ItemType, Skip)

Why haven't you defined the event like
Private Sub object_LoopItem(LocalFile, RemoteFile, DirItem, Skip)?

With the DirItem class it would be possible to check file extension AND file date AND file size and then set skip flag or not.

Now I have to call recursively the ListDir method and go manually through the DirItems collection to check extension, size, date and then call GetFile for each single file I want to download.

It would be much easier if I could call GetFiles, could check in the LoopItem event the DirItem property/class and set the skip flag if I don't want that kind of file.

Dirk

Re: LoopItem Event

by wodSupport, Saturday, March 05, 2005, 14:28 (7002 days ago) @ Judgy

Dirk,

you're right, it seems more convinient to have DirItem. Not sure why we didn't provide it, unfortunatelly we cannot change event declaration anymore.

You can implement this looping for yourself. All you need to do is call ListDir, then put all elements of it in the collection, and then loop on each element of the collection. If item is a subdir, just issue ListDir and put new items in same collection (etc..).