On Thu, Oct 25, 2012 at 02:15:06AM +0200, Joseph Rushton Wakeling wrote: > Hello all, > > I've just been playing with dirEntries and by the looks of it, it > returns these entries in arbitrary order. > > Is there a way to get it to sort the entries in alphabetical order, > other than the obvious one of storing them in an array and sorting > that? (This is untenable because I'm talking about a lot of > files...:-) [...]
This may not be possible if the OS doesn't keep the entries in sorted order (and from what I know, most OS's don't; it's only sorted upon display). *Somebody* will have to do the sorting, whether it's the OS, or the library or user code. The performance penalty will still be incurred regardless. T -- Don't drink and derive. Alcohol and algebra don't mix.