Subject: Re: readdir()/getdents() portability -- "."/".." always first?
To: None <M.Drochner@fz-juelich.de>
From: Klaus Klein <kleink@reziprozitaet.de>
List: current-users
Date: 09/02/2003 18:06:37
Matthias Drochner <M.Drochner@fz-juelich.de> writes:

> Can we _really_ rely on "." and ".." to be the first 2 entries,
> whatever filesystem we use (or whatever system we compile our
> "make" on)?

As far as application portability is concerned, we can't.  Per POSIX
the directory stream is an ordered sequence which readdir() will
traverse in a linear fashion, but it is silent about the ordering of
the sequence.


- Klaus