comp.lang.ada
 help / color / mirror / Atom feed
From: Anders Wirzenius <anders@no.email.thanks.invalid>
Subject: Re: File list on Windows and Debian
Date: Tue, 20 Jun 2006 10:23:18 GMT
Date: 2006-06-20T10:23:18+00:00	[thread overview]
Message-ID: <uodworuqx.fsf@no.email.thanks.invalid> (raw)
In-Reply-To: 1150790778.224228.282310@y41g2000cwy.googlegroups.com

"Ludovic Brenta" <ludovic@ludovic-brenta.org> writes:

> Anders Wirzenius writes :
> > I am trying to process files in a directory. They have to be processed
> > in alphabetical order. With following code I get a nice sorted list on
> > Windows XP but not sorted at all on Linux Debian. Have I missed
> > something that switches the sorting on on Debian (Sarge)?
> 
> I tried your program at home, and had to tweak it a little bit for it
> to compile. Then I also ghot unsorted directory entries, like I did
> with another program I wrote.
> 
> I think this is by design on GNU/Linux systems. They don't impose the
> overhead of sorting potentially large numbers of directory entries
> unless you really need to sort them.
> 

Thanks for your time and effort. 

> If you insist on sorting, you'd have to do that yourself: first, store
> the directory entries (perhaps as GNAT.OS_Lib.String_Access values) in
> a container and sort it. I would suggest either GNAT.Dynamic_Tables and
> GNAT.Heap_Sort_G, or Charles.Vectors.Unbounded.Generic_Sort in the
> libcharles0-dev package. Beware however of unbounded memory usage.
> 

I'll look at them. 

> HTH

Yes it helped, it clarified the status quo.

-- 
Anders



  reply	other threads:[~2006-06-20 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-19  8:09 File list on Windows and Debian Anders Wirzenius
2006-06-20  8:06 ` Ludovic Brenta
2006-06-20 10:23   ` Anders Wirzenius [this message]
2006-06-20 11:59     ` M E Leypold
2006-06-21  6:13   ` Anders Wirzenius
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox