Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Api for ADIR
Message
 
To
10/11/1998 12:50:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00156185
Message ID:
00156252
Views:
49
>>That will return everything including folders but I need 'only' folders.
>>Thanks
>I don't know how performance would be affected but there is at least two ways to do it with adir() :
>1) Scan array for coulmn 5 containing "D"
>2) Set default to fakeroot and execute adir with empty file skeleton (again system and hidden should be checked unfortunately).
>From a thread with George about this as I remember API wasn't much faster. George I hope you remember better than me :)

Hi Cetin,

As a matter of fact, I think it was slower (but these days I don't remember things as well as I used to). The problem being that in order to properly convert the structure, there are 6 calls to the API for each file/directory (FileTimeToLocalFileTime and FileTimeToSystemTime 3 times for each file), plus the conversion from strings to integers to DateTimes. So I'd assume it'd be slower. Add on screening the attributes to bypass non-directories, and it does speed it up some, but I'm not convinced that it'd be faster.

Actually, I'm working on something like this for Advisor right now. However, I think Mark could modify my class fairly easily to do the job he needs done.

Mark, if you want to try that and need some help, give me a shout.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform