
November 3rd, 2003, 09:41 PM
|
|
Contributing User
|
|
Join Date: Sep 2003
Posts: 68
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
It says plenty, you just aren't reading into it enough. You'll find that the man pages contain pretty much everything you'll need for most situations. For example, by reading the man pages for opendir, readdir and closedir, I could come up with this to test their functionality:
Code:
#include <dirent.h>
#include <stdio.h>
int main(void)
{
DIR *d;
struct dirent *dir;
if ((d = opendir(".")) != NULL) {
while ((dir = readdir(d)) != NULL)
printf("%s\n", dir->d_name);
closedir(d);
}
return 0;
}
|