[][src]Module wasi_common::fs

A very experimental module modeled providing a high-level and safe filesystem interface, modeled after std::fs, implemented on top of WASI functions.

Most functions in this API are not yet implemented!

This corresponds to std::fs.

Instead of std::fs's free functions which operate on paths, this crate has methods on Dir which operate on paths which must be relative to and within the directory.

Since all functions which expose raw file descriptors are unsafe, I/O handles in this API are unforgeable (unsafe code notwithstanding). This combined with WASI's lack of absolute paths provides a natural capability-oriented interface.

Structs

Dir

A reference to an open directory on the filesystem.

DirBuilder

A builder used to create directories in various manners.

DirEntry

Entries returned by the ReadDir iterator.

File

A reference to an open file on the filesystem.

FileType

A structure representing a type of file with accessors for each file type. It is returned by Metadata::file_type method.

Metadata

Metadata information about a file.

OpenOptions

Options and flags which can be used to configure how a file is opened.

Permissions

Representation of the various permissions on a file.

ReadDir

Iterator over the entries in a directory.