I am at a loss as to how dirent
entries are ordered. For example, if I had the code
DIR* dir = opendir("/some/directory");
struct dirent* entry;
while ((entry = readdir(dir))
printf("%s\n", entry->d_name);
This may output something like the following:
abcdef
example3
..
.
123456789
example2
example1
As you can see, this output is not alphabetically ordered. So, I was wondering how exactly dirent
entries are ordered? What causes some entries to have a higher precedence than others?