ansi c and directories

Peter da Silva peter at ficc.uu.net
Wed Dec 6 01:15:42 AEST 1989


In article <11738 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
> In article <7193 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
> >In any system for which files have names, there is at least one directory.

> Not necessarily one that could be opened by name.

Doesn't have to. Surely you can see a way around that. Have a default
that's used when you specify a file name of NULL.

> >Thus a routine that returns the names of files in at least the current
> >directory is more generally portable than system().

> The concept of "current directory" is also not portable.

Sure it is. It's where the system looks up the file names you give it.

> >And, as you pointed out, system() is in the standard.

> system() was in the library Base Document; the dirent stuff wasn't.

Pity.
-- 
`-_-' Peter da Silva. +1 713 274 5180. <peter at ficc.uu.net>.
 'U`  Also <peter at ficc.lonestar.org> or <peter at sugar.lonestar.org>.

      "If you want PL/I, you know where to find it." -- Dennis



More information about the Comp.lang.c mailing list