diff --git a/docs/WASI-api.md b/docs/WASI-api.md index 0c721bacd5..96f800a8fa 100644 --- a/docs/WASI-api.md +++ b/docs/WASI-api.md @@ -1837,6 +1837,36 @@ Possible values: Truncate file to size 0. +### `__wasi_preopentype_t` (`uint8_t`) + +Preopened resource type. + +Used by [`__wasi_prestat_t`](#prestat). + +Possible values: + +- **`__WASI_PREOPENTYPE_DIR`** + + Preopened directory. + +### `__wasi_prestat_t` (`struct`) + +Information about a preopened resource. + +Used by [`__wasi_fd_prestat_get()`](#fd_prestat_get). + +Members: + +- [\_\_wasi\_preopentype\_t](#preopentype) pr\_type + + The type of the preopened resource. + +- When `pr_type` is [`__WASI_PREOPENTYPE_DIR`](#preopentype.dir): + + - size\_t u.pr\_name\_len + + The length of the preopened directory name. + ### `__wasi_riflags_t` (`uint16_t` bitfield) Flags provided to [`__wasi_sock_recv()`](#sock_recv).