finding out if a directory is empty in C program (was Re: How do I tell when a directory is empty in a script?)
J.T. Conklin
jtc at motcad.portal.com
Sat Apr 27 01:43:47 AEST 1991
In article <1991Apr25.223540.19303 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>And if you have a system that doesn't have opendir() or something like it,
>instead forcing you to open and read the directory file directly, then you
>should find your vendor and shoot him.
And then obtain a copy of Doug Gwyn's dirent library and use it instead
of opening and reading the directory directly.
In my opinion it is far easier to maintain a "portability library" of
routines that standardize non-standard machines than it is to maintain
baseline code with twisty mazes of #ifdefs.
--
J.T. Conklin jtc at motcad.portal.com, ...!portal!motcad!jtc
More information about the Comp.unix.questions
mailing list