[plt-scheme] directory-list order?
Just sort it. -- Matthias
(require (lib "list.ss"))
(define (read-directory)
(define (path< p q)
(< (file-or-directory-modify-seconds (path->string p))
(file-or-directory-modify-seconds (path->string q))))
(quicksort (directory-list) path<))
I know. We could use shorter names.
On Sep 13, 2006, at 11:16 AM, Gordon Weakliem wrote:
> It's definitely platform specific behavior at least - on Windows it
> returns the list in alphabetical order.
>
> On 13 Sep 2006 05:20:12 -0000, Paul Graham < pg at ycombinator.com>
> wrote:Is it defined what order directory-list returns filenames in?
> It currently seems to return files in order of creation. This
> is extremely convenient for the app I'm writing, and it would
> be handy if I could count on it... --pg
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>
>
> --
> --
> Gordon Weakliem
> http://www.agileprogrammer.com/eightytwenty
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme