Skip to content

Commit

Permalink
Explicitly document that Preview1's fd_readdir includes . and `..…
Browse files Browse the repository at this point in the history
…`. (WebAssembly#516)

As discussed in the the 02-09 meeting, explicitly document that
Preview1's `fd_readdir` includes the `.` and `..`.

This resolves WebAssembly/wasi-testsuite#52.
  • Loading branch information
sunfishcode committed Feb 17, 2023
1 parent 1ad15f3 commit b44552d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions legacy/preview1/witx/wasi_snapshot_preview1.witx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@
;;; truncating the last directory entry. This allows the caller to grow its
;;; read buffer size in case it's too small to fit a single large directory
;;; entry, or skip the oversized directory entry.
;;;
;;; Entries for the special `.` and `..` directory entries are included in the
;;; sequence.
(@interface func (export "fd_readdir")
(param $fd $fd)
;;; The buffer where directory entries are stored
Expand Down

0 comments on commit b44552d

Please sign in to comment.