Re: A function for ls?



On Fri, 23 Feb 2001, Germano Rizzo wrote:

>     is there a library function that gives the contents of a directory?
> Something like 'ls'... or a way to do it using other functions?

It's platform dependent.  On a POSIX-compliant system you can

#include <dirent.h>

end use functions such as opendir(), readdir(), ...  These all have
manual pages e.g. man 3 opendir.

Allin Cottrell.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]