Posted by Gordon Burditt on 09/15/07 17:40
>Was reviewing a few of the pages I made and something seemed odd.
>Further investigation showed that my thumbs are not in the order of the
>filesystem.
I believe that the order in which readdir() returns entries is *BY
DEFINITION* the order of the filesystem. If you want alphabetical
order or something else, sort it yourself.
>So it starts at pic 1370 and ends back at 1359. In reality the pics
>start at 1359 and end at 1424. Maybe the question is how is the file
>system really sorted?
It isn't.
>Using Filezilla it appears to be ascending by
>filename. Date and time of shots are ascending as this is all from the
>same "roll".
Many programs, like "ls" sort the file names for display purposes.
If you want a particular order (e.g. by name or file time or size),
sort it yourself. "ls -f" gives you unsorted output if your ls has
that option.
Navigation:
[Reply to this message]
|