1#ifndef DIRENT_H
2#define DIRENT_H
34
typedef struct DIR DIR;
56
#define DT_UNKNOWN 0
7#define DT_DIR 1
8#define DT_REG 2
9#define DT_LNK 3
1011
struct dirent {
12char d_name[FILENAME_MAX]; /* File name. */
13union {
14unsigned short d_reclen; /* Always zero. */
15unsigned char d_type; /* Reimplementation adds this */
16};
17};
1819
DIR *opendir(const char *dirname);
20struct dirent *readdir(DIR *dir);
21int closedir(DIR *dir);
2223
#endif /* DIRENT_H */