Re: dir()

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...

I feel like I'm tooting my own horn here...

My win_dir routine will not consume lots of memory when "walking" a directory. It calls your routine each time it encounters a single file, it does not collect all the files up at once then call your routine for each one. Maximum memory usage is in the range of about 1-4 KB, give-or-take some given the length of the current path. blink

-Greg



The key words to me not using it is it's *your* code that's "walking" the directory, not mine. Why doesn't win_dir() allow that? such as:

thisdir = win_dir(path,ndxptr) 



to get the 1st ndxptr or the 250,346th one?

There's actually several apps that use this approach, which i found after Matt reminded me of the calls. Seem there's like a dozen Eu apps with variants on FindFirstFile(), and a dozen variants of that call in the winapi. Problem is, if you call their dir functions, they emulate the Eu built-in dir(), and return the same massive structure.

I still have not jumped into windows "call backs", and the instant i see anything containing "call back", i close the document. When i call code, i want something from it besides it recursively calling my code, for me to call it again, for it to call me, for me to call it, etc etc. In the dos days, i very quickly ate up all the stack space doing things like that. It's the big reason i left Turbo Pascal for Euphoria, and i don't want to get into that pit again.

useless

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu