Re: file access again

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

PS: There's over 143,000 files in that directory. Is there an integer type overflow going on in the Eu internals pertaining to file access?

No. On Windoze, the implementation of dir() is written by Derek and (looking at the code in trunk/source/be_machine.c, Dir() 1 out of 2) it seems that he was very careful to avoid this. The implementation calls FindFirstFile() and FindNextFile() (both from the W32/64API), reusing the same variable and replacing the old HANDLE with the new one (instead of getting a list of all the files at once and trying to do a loop through them with an integer counter).

There is a loop, but it simply checks to see if the HANDLE variable still points to a valid handle or not.

The only time that -1 is returned is when INVALID_HANDLE is returned by the FindFirstFile() W32/64API function.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu