[−][src]Function wasi::wasi_snapshot_preview1::fd_readdir
pub unsafe extern "C" fn fd_readdir(
fd: Fd,
buf: *mut u8,
buf_len: Size,
cookie: Dircookie,
bufused: *mut Size
) -> Errno
Read directory entries from a directory.
When successful, the contents of the output buffer consist of a sequence of
directory entries. Each directory entry consists of a dirent
object,
followed by dirent::d_namlen
bytes holding the name of the directory
entry.
This function fills the output buffer as much as possible, potentially
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.