On Thu, Jan 02, 2003 at 07:05:30PM +0100, cana rich wrote:
> I am using Linux RedHat7.2 and i would like to know how to list
> the content of a directory (as dir or ls) in C program?

As Tom Burke wrote, you could do a 'system("ls")'.  A more programmatic
solution would be via to use the traditional Unix library calls:
opendir,readdir,closedir,rewinddir,seekdir,telldir,scandir.  Another
solution would be to use the 'getdirentries' library routine.

Cheers,
-- 
        Dave Ihnat
        [EMAIL PROTECTED]



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to