async_wasi::snapshots::common::vfsTrait WasiFileSys
Source pub trait WasiFileSys {
type Index: Sized;
Show 14 methods
// Required methods
fn path_open(
&mut self,
dir_ino: Self::Index,
path: &str,
oflags: OFlags,
fs_rights_base: WASIRights,
fs_rights_inheriting: WASIRights,
fdflags: FdFlags,
) -> Result<Self::Index, Errno>;
fn path_rename(
&mut self,
old_dir: Self::Index,
old_path: &str,
new_dir: Self::Index,
new_path: &str,
) -> Result<(), Errno>;
fn path_create_directory(
&mut self,
dir_ino: Self::Index,
path: &str,
) -> Result<(), Errno>;
fn path_remove_directory(
&mut self,
dir_ino: Self::Index,
path: &str,
) -> Result<(), Errno>;
fn path_unlink_file(
&mut self,
dir_ino: Self::Index,
path: &str,
) -> Result<(), Errno>;
fn path_link_file(
&mut self,
old_dir: Self::Index,
old_path: &str,
new_dir: Self::Index,
new_path: &str,
) -> Result<(), Errno>;
fn path_filestat_get(
&self,
dir_ino: Self::Index,
path: &str,
follow_symlinks: bool,
) -> Result<Filestat, Errno>;
fn get_mut_inode(&mut self, ino: usize) -> Result<&mut dyn WasiNode, Errno>;
fn get_inode(&self, ino: usize) -> Result<&dyn WasiNode, Errno>;
fn get_mut_file(&mut self, ino: usize) -> Result<&mut dyn WasiFile, Errno>;
fn get_file(&self, ino: usize) -> Result<&dyn WasiFile, Errno>;
fn get_mut_dir(&mut self, ino: usize) -> Result<&mut dyn WasiDir, Errno>;
fn get_dir(&self, ino: usize) -> Result<&dyn WasiDir, Errno>;
// Provided method
fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno> { ... }
}