mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 13:30:06 +00:00
26 lines
358 B
C
26 lines
358 B
C
/*@group*/
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
#include <dirent.h>
|
|
/*@end group*/
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
DIR *dp;
|
|
struct dirent *ep;
|
|
|
|
dp = opendir ("./");
|
|
if (dp != NULL)
|
|
{
|
|
while (ep = readdir (dp))
|
|
puts (ep->d_name);
|
|
(void) closedir (dp);
|
|
}
|
|
else
|
|
puts ("Couldn't open the directory.");
|
|
|
|
return 0;
|
|
}
|