List a directory in a C program on Unix machines

Shiping Zhang ping at cubmol.bio.columbia.edu
Sat Aug 11 07:39:53 AEST 1990


In article <1990Aug10.154506.846 at caen.engin.umich.edu> cys at caen.engin.umich.edu writes:
>  I am currently writing a C program on Unix machines. What I want to
>do is to store the file names in a directory into a character array.
>So I can do something to those files. I want to use Unix system calls
>to handle it. Could anyone help me out with that? 


I think opendir(), readdir() etc. can handle this problems. Check
your man pages.

-ping



More information about the Comp.lang.c mailing list