C on Directory

Guy Harris guy at auspex.auspex.com
Tue Oct 24 06:00:12 AEST 1989


>Open/Read/Close Dir could be implemented as macros to open a file, read it with
>this structure, and close it.

They already have been, but as subroutines, not macros.  Volume 9 of the
"comp.sources.unix" archive has "gwyn-dir-lib", which is an
implementation of the standard POSIX directory-access routines (which
are almost the same as the BSD ones, modulo some name-space cleanups -
"struct direct" became "struct dirent" to avoid collisions with any
"struct direct" that describes the on-disk format of directories, and
<sys/dir.h> became <dirent.h>).



More information about the Comp.unix.wizards mailing list