Afficher un message
Vieux 15/09/2007, 18h40   #3
Gordon Burditt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: readdir() doesn't maintain order

>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.

  Réponse avec citation
 
Page generated in 0,04760 seconds with 9 queries