]>
Commit | Line | Data |
---|---|---|
320054e8 DG |
1 | #ifndef __wasilibc___header_dirent_h |
2 | #define __wasilibc___header_dirent_h | |
3 | ||
446cb3f1 | 4 | #include <wasi/api.h> |
320054e8 DG |
5 | |
6 | #define DT_BLK __WASI_FILETYPE_BLOCK_DEVICE | |
7 | #define DT_CHR __WASI_FILETYPE_CHARACTER_DEVICE | |
8 | #define DT_DIR __WASI_FILETYPE_DIRECTORY | |
9 | #define DT_FIFO __WASI_FILETYPE_SOCKET_STREAM | |
10 | #define DT_LNK __WASI_FILETYPE_SYMBOLIC_LINK | |
11 | #define DT_REG __WASI_FILETYPE_REGULAR_FILE | |
12 | #define DT_UNKNOWN __WASI_FILETYPE_UNKNOWN | |
13 | ||
9c58e6c2 DG |
14 | #define IFTODT(x) (__wasilibc_iftodt(x)) |
15 | #define DTTOIF(x) (__wasilibc_dttoif(x)) | |
16 | ||
17 | int __wasilibc_iftodt(int x); | |
18 | int __wasilibc_dttoif(int x); | |
19 | ||
320054e8 DG |
20 | #include <__struct_dirent.h> |
21 | #include <__typedef_DIR.h> | |
22 | ||
23 | #ifdef __cplusplus | |
24 | extern "C" { | |
25 | #endif | |
26 | ||
27 | int closedir(DIR *); | |
28 | DIR *opendir(const char *); | |
29 | DIR *fdopendir(int); | |
30 | int fdclosedir(DIR *); | |
31 | struct dirent *readdir(DIR *); | |
32 | void rewinddir(DIR *); | |
33 | void seekdir(DIR *, long); | |
34 | long telldir(DIR *); | |
35 | DIR *opendirat(int, const char *); | |
36 | void rewinddir(DIR *); | |
37 | int scandirat(int, const char *, struct dirent ***, | |
38 | int (*)(const struct dirent *), | |
39 | int (*)(const struct dirent **, const struct dirent **)); | |
40 | ||
41 | #ifdef __cplusplus | |
42 | } | |
43 | #endif | |
44 | ||
45 | #endif |