]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/headers/public/__header_dirent.h
Wasi snapshot preview1 (#140)
[wasi-libc.git] / libc-bottom-half / headers / public / __header_dirent.h
1 #ifndef __wasilibc___header_dirent_h
2 #define __wasilibc___header_dirent_h
3
4 #include <wasi/api.h>
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
14 #include <__struct_dirent.h>
15 #include <__typedef_DIR.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 int closedir(DIR *);
22 DIR *opendir(const char *);
23 DIR *fdopendir(int);
24 int fdclosedir(DIR *);
25 struct dirent *readdir(DIR *);
26 void rewinddir(DIR *);
27 void seekdir(DIR *, long);
28 long telldir(DIR *);
29 DIR *opendirat(int, const char *);
30 void rewinddir(DIR *);
31 int scandirat(int, const char *, struct dirent ***,
32 int (*)(const struct dirent *),
33 int (*)(const struct dirent **, const struct dirent **));
34
35 #ifdef __cplusplus
36 }
37 #endif
38
39 #endif