Where oh where is my directory

John Campbell jdc at naucse.UUCP
Sat Mar 25 20:56:56 AEST 1989


>From article <1989Mar25.002620.20439 at utzoo.uucp>, by henry at utzoo.uucp (Henry Spencer):
> In article <7712 at pyr.gatech.EDU> perrone at 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 at 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 at NAUVAX.bitnet
	unix?  Sure send me a dozen, all different colors.



More information about the Comp.lang.c mailing list