34 lines
555 B
C
34 lines
555 B
C
#ifndef DIRENT_H_
|
|
#define DIRENT_H_
|
|
|
|
#include <sys/types.h>
|
|
|
|
#define DT_UNKNOWN 0
|
|
#define DT_BLK 1
|
|
#define DT_CHR 2
|
|
#define DT_DIR 3
|
|
#define DT_FIFO 4
|
|
#define DT_LNK 5
|
|
#define DT_REG 6
|
|
#define DT_SOCK 7
|
|
|
|
struct dirent {
|
|
ino_t d_ino;
|
|
off_t d_off;
|
|
unsigned short d_reclen;
|
|
unsigned char d_type;
|
|
char d_name[256];
|
|
};
|
|
|
|
struct __opaque_dir;
|
|
typedef struct __opaque_dir DIR;
|
|
|
|
extern DIR *opendir(const char *name);
|
|
extern DIR *fdopendir(int fd);
|
|
|
|
extern int closedir(DIR *dirp);
|
|
|
|
extern struct dirent *readdir(DIR *dirp);
|
|
|
|
#endif
|