Cheat sheet for opendir()

Kenneth Brody kenbrody at spamcop.net
Tue Dec 1 07:19:25 PST 2009


John Esak wrote:
[...]
> Here comes some of the hinty things.  If you ask for *every* file in a
> directory, opendir() will always find at least two (2) files.  You will not
> usually find n to be equal to zero even in an empty directory.  That is
> because there are always two files in any folder represented by "." and
> "..".
[...]

Thanks for the informative post.  However, I have one nit to pick.  On 
Windows filesystems, there are no "." and ".." entries in the root directory.

-- 
Kenneth Brody


More information about the Filepro-list mailing list