Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!noao!arizona!naucse!jdc From: jdc@naucse.UUCP (John Campbell) Newsgroups: comp.lang.c Subject: Re: Where oh where is my directory Message-ID: <1236@naucse.UUCP> Date: 25 Mar 89 10:56:56 GMT References: <1989Mar25.002620.20439@utzoo.uucp> Organization: Northern Arizona University, Flagstaff, AZ Lines: 28 From article <1989Mar25.002620.20439@utzoo.uucp>, by henry@utzoo.uucp (Henry Spencer): > In article <7712@pyr.gatech.EDU> perrone@loligo.UUCP (Perrone Ford) writes: >>Help , Althogh I wa originally developing this program >>for TurboC I am interested if there is an ANSI way to >>list the files in the current or another directory. > > There isn't even an ANSI notion of a directory, never mind an ANSI way > to list the files in it. > -- > Welcome to Mars! Your | Henry Spencer at U of Toronto Zoology > passport and visa, comrade? | uunet!attcan!utzoo!henry henry@zoo.toronto.edu Yes, one wouldn't expect Henry Spencer to be wrong, and he's not, of course, but... As a practical matter, shouldn't someone mention opendir(), readdir() and the dirent.h stuff that is commonly used to get the most portability out of this thorny problem. I seem to remember that there are SysV and MSDOS versions of these routines implemented and I would guess that most systems which have heirarchical directories can be made to emulate them. (Any Amiga or MacIntosh owners disagree?) I, for one, would like it if some of the good PC programmers wrote their stuff so it was more easy to move to my unix machine :-). -- John Campbell ...!arizona!naucse!jdc CAMPBELL@NAUVAX.bitnet unix? Sure send me a dozen, all different colors.