Re: dir()

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

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

The problem is that FindFirstFile and FindNextFile return a "find handle" and it's expected that one enumerates the entire directory, then closes the handle. I don't know if there's a way to get the number of files and jump around randomly in the list.

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu