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 {
12unsigned char d_type; /* file type to prevent lstat after readdir */
13char d_name[MAX_PATH]; /* file name */
14};
1516
DIR *opendir(const char *dirname);
17struct dirent *readdir(DIR *dir);
18int closedir(DIR *dir);
1920
#endif /* DIRENT_H */