Actually the order won't even be consistent. For example, deleting an entry then adding another will likely change the order somewhat. The order depends on the operating system and the file system that is being used.
With Windows for example, readdir most likely uses FindFirstFile/FindNextFile which don't specify the order files are returned.
In reply to Re: Order of files returned by readdir
by GrandFather
in thread Order of files returned by readdir
by jpfarmer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |