ReadDir and NextFile

Blitz3D Forums/Blitz3D Beginners Area/ReadDir and NextFile

_PJ_(Posted 2010) [#1]
From my experience the reading of folders / files always seems to be in a

.
SPACE
0
A
a

Apparently Matching the ASCII numbering and I am assuming based on Windows OS actual file reading, not related to the display view of Windows explorer ordering.

I was wondering if my assumption above is correct, so that whenever the commands are used, provided the actual contents of the folder have not been altered, then it will always return results in the same order?

---

By the way, I can appreciate that it's not especially 'safe' to rely on the above, even if it's correct, since qwindows lieks to populate folders with view settings etc.


Charrua(Posted 2010) [#2]
i don't supose that always be the same, i should fill an array or a list of typed objets and then sort it alphabetically or whatever i need and then use it.

my experience with "always" is very bad!

if you see the old dos Directory structure, it fill the etries in sequence (with out sort) and if you delete an entrie i really don't know if it uses it next or when no more room is in the list... and (worst) mos of this extrange thing are inherited in windows... isnt't it?

Juan

Last edited 2010


_PJ_(Posted 2010) [#3]
I agree, Charruah, it's not really a reliable way to depend on 'always'. I'm not sure about the dos structure, or what happens with NextFile when a file is modified after the ReadDir...

I guess on thinking about iot, it's best left alone and not relied upon. Thanks :)