-
-
Notifications
You must be signed in to change notification settings - Fork 3
direntry.3
Manvendra Bhangui edited this page May 7, 2023
·
2 revisions
direntry - read directory entries
#include <direntry.h>
DIR *opendir(fn);
struct direntry *readdir(dir);
void closedir(dir);
DIR *dir;
char *fn;
The point of direntry.h is to provide a uniform interface to BSD's sys/dir.h and POSIX's dirent.h.
The readdir interface is highly unsatisfactory. It does not distinguish between I/O errors and end-of-directory. It uses malloc. The return type for closedir varies: some implementations return the close return value.
readdir(3)