home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
disk
/
mkisofs-1.00.7.lha
/
mkisofs
/
unix
/
testreaddir.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-29
|
394b
|
24 lines
/* testreaddir.c: */
#include <stdlib.h>
#include <stdio.h>
#include "unixlib.h"
void main (int argc, char *argv[])
{
DIR *dir;
struct dirent *ent;
if (!(dir = opendir (argv[1]))) {
fprintf (stderr, "cannot open directory '%s'\n", argv[1]);
perror ("");
exit (1);
}
while (ent = readdir (dir)) {
printf ("%s\n", ent->d_name);
}
closedir (dir);
exit (0);
}