Unix C routines
Greg Hunt
hunt at dg-rtp.rtp.dg.com
Thu Dec 6 02:34:14 AEST 1990
In article <1990Dec5.051318.22071 at metro.ucc.su.OZ.AU>, andrew at ee.su.oz.au (Andrew Ho) writes:
>
> I am writing an application for Unix X-window
> which requires the following routines :
>
> (1) a routine that can return the full path
> string of the current directory
>
> (2) another routine to return all the file
> names in the current directory
>
> Are there any Unix built-in system calls to do so ?
There are C library calls that can do want you need:
Try getwd or getcwd to get the pathname of the current directory.
Try opendir, readir, and closedir to iteratively get all the names
of the files in a directory.
Of course, you'll need to check that your C libraries actually
implement these calls. Enjoy!
--
Greg Hunt Internet: hunt at dg-rtp.rtp.dg.com
DG/UX Kernel Development UUCP: {world}!mcnc!rti!dg-rtp!hunt
Data General Corporation
Research Triangle Park, NC, USA These opinions are mine, not DG's.
More information about the Comp.unix.questions
mailing list