#pragma once #include #define DT_UNKNOWN 0 #define DT_FIFO 1 #define DT_CHR 2 #define DT_DIR 4 #define DT_BLK 6 #define DT_REG 8 #define DT_LNK 10 #define DT_SOCK 12 #define NAME_MAX 255 struct dirent { ino_t d_ino; unsigned char d_type; char d_name[NAME_MAX + 1]; }; typedef struct DIR DIR; DIR *opendir(const char *name); struct dirent *readdir(DIR *dirp); int closedir(DIR *dirp); void rewinddir(DIR *dirp); #ifdef _APHELEIA_SOURCE #define DIRENT_NAME_MAX NAME_MAX typedef struct dirent dirent_t; ssize_t getdents(int fd, struct dirent *out, size_t len); #endif