Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!portal!motcad!jtc From: jtc@motcad.portal.com (J.T. Conklin) Newsgroups: comp.unix.questions Subject: Re: finding out if a directory is empty in C program (was Re: How do I tell when a directory is empty in a script?) Message-ID: <1991Apr26.154347.21338@motcad.portal.com> Date: 26 Apr 91 15:43:47 GMT References: <1991Apr18.054735.6733@metapro.DIALix.oz.au> <1991Apr25.022029.5476@csc.canberra.edu.au> <1991Apr25.223540.19303@athena.mit.edu> Organization: Computer Signal Corp., San Ramon, California Lines: 14 In article <1991Apr25.223540.19303@athena.mit.edu> jik@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@motcad.portal.com, ...!portal!motcad!jtc