Using opendir() with a filePro file name

Jay R. Ashworth jra at baylink.com
Mon Apr 10 07:01:30 PDT 2006


On Wed, Apr 05, 2006 at 11:20:36PM -0400, Fairlight wrote:
> > where lc is a counter that begins at "3", so that I skip "." and "..".
> 
> What makes you think . and .. are necessarily going to be entries 1 and 2?

On a *nix system with standard semantics, if you walk the directory in
unsorted order, they are in fact guaranteed to be entries 1 and 2:
they're populated when the directory is created, atomically.

I suspect SUS or SVID specifies this.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

     A: Because it messes up the order in which people normally read text.
     Q: Why is top-posting such a bad thing? 
     
     A: Top-posting.
     Q: What is the most annoying thing on Usenet and in e-mail?


More information about the Filepro-list mailing list