Trait wasmtime_wasi::WasiDir[][src]

pub trait WasiDir {
Show methods fn as_any(&self) -> &(dyn Any + 'static);
fn open_file(
        &self,
        symlink_follow: bool,
        path: &str,
        oflags: OFlags,
        read: bool,
        write: bool,
        fdflags: FdFlags
    ) -> Result<Box<dyn WasiFile + 'static, Global>, Error>;
fn open_dir(
        &self,
        symlink_follow: bool,
        path: &str
    ) -> Result<Box<dyn WasiDir + 'static, Global>, Error>;
fn create_dir(&self, path: &str) -> Result<(), Error>;
fn readdir(
        &self,
        cursor: ReaddirCursor
    ) -> Result<Box<dyn Iterator<Item = Result<ReaddirEntity, Error>> + 'static, Global>, Error>;
fn symlink(&self, old_path: &str, new_path: &str) -> Result<(), Error>;
fn remove_dir(&self, path: &str) -> Result<(), Error>;
fn unlink_file(&self, path: &str) -> Result<(), Error>;
fn read_link(&self, path: &str) -> Result<PathBuf, Error>;
fn get_filestat(&self) -> Result<Filestat, Error>;
fn get_path_filestat(
        &self,
        path: &str,
        follow_symlinks: bool
    ) -> Result<Filestat, Error>;
fn rename(
        &self,
        path: &str,
        dest_dir: &dyn WasiDir,
        dest_path: &str
    ) -> Result<(), Error>;
fn hard_link(
        &self,
        path: &str,
        target_dir: &dyn WasiDir,
        target_path: &str
    ) -> Result<(), Error>;
fn set_times(
        &self,
        path: &str,
        atime: Option<SystemTimeSpec>,
        mtime: Option<SystemTimeSpec>,
        follow_symlinks: bool
    ) -> Result<(), Error>;
}

Required methods

fn as_any(&self) -> &(dyn Any + 'static)[src]

fn open_file(
    &self,
    symlink_follow: bool,
    path: &str,
    oflags: OFlags,
    read: bool,
    write: bool,
    fdflags: FdFlags
) -> Result<Box<dyn WasiFile + 'static, Global>, Error>
[src]

fn open_dir(
    &self,
    symlink_follow: bool,
    path: &str
) -> Result<Box<dyn WasiDir + 'static, Global>, Error>
[src]

fn create_dir(&self, path: &str) -> Result<(), Error>[src]

fn readdir(
    &self,
    cursor: ReaddirCursor
) -> Result<Box<dyn Iterator<Item = Result<ReaddirEntity, Error>> + 'static, Global>, Error>
[src]

fn remove_dir(&self, path: &str) -> Result<(), Error>[src]

fn get_filestat(&self) -> Result<Filestat, Error>[src]

fn get_path_filestat(
    &self,
    path: &str,
    follow_symlinks: bool
) -> Result<Filestat, Error>
[src]

fn rename(
    &self,
    path: &str,
    dest_dir: &dyn WasiDir,
    dest_path: &str
) -> Result<(), Error>
[src]

fn set_times(
    &self,
    path: &str,
    atime: Option<SystemTimeSpec>,
    mtime: Option<SystemTimeSpec>,
    follow_symlinks: bool
) -> Result<(), Error>
[src]

Implementors

impl WasiDir for Dir[src]

pub fn as_any(&self) -> &(dyn Any + 'static)[src]

pub fn open_file(
    &self,
    symlink_follow: bool,
    path: &str,
    oflags: OFlags,
    read: bool,
    write: bool,
    fdflags: FdFlags
) -> Result<Box<dyn WasiFile + 'static, Global>, Error>
[src]

pub fn open_dir(
    &self,
    symlink_follow: bool,
    path: &str
) -> Result<Box<dyn WasiDir + 'static, Global>, Error>
[src]

pub fn create_dir(&self, path: &str) -> Result<(), Error>[src]

pub fn readdir(
    &self,
    cursor: ReaddirCursor
) -> Result<Box<dyn Iterator<Item = Result<ReaddirEntity, Error>> + 'static, Global>, Error>
[src]

pub fn remove_dir(&self, path: &str) -> Result<(), Error>[src]

pub fn get_filestat(&self) -> Result<Filestat, Error>[src]

pub fn get_path_filestat(
    &self,
    path: &str,
    follow_symlinks: bool
) -> Result<Filestat, Error>
[src]

pub fn rename(
    &self,
    src_path: &str,
    dest_dir: &dyn WasiDir,
    dest_path: &str
) -> Result<(), Error>
[src]

pub fn set_times(
    &self,
    path: &str,
    atime: Option<SystemTimeSpec>,
    mtime: Option<SystemTimeSpec>,
    follow_symlinks: bool
) -> Result<(), Error>
[src]