Trait wasmer_wasix::syscalls::FileSystem

pub(crate) trait FileSystem: Debug + Send + Sync + 'static + Upcastable {
    // Required methods
    fn readlink(&self, path: &Path) -> Result<PathBuf, FsError>;
    fn read_dir(&self, path: &Path) -> Result<ReadDir, FsError>;
    fn create_dir(&self, path: &Path) -> Result<(), FsError>;
    fn remove_dir(&self, path: &Path) -> Result<(), FsError>;
    fn rename<'a>(
        &'a self,
        from: &'a Path,
        to: &'a Path,
    ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>;
    fn metadata(&self, path: &Path) -> Result<Metadata, FsError>;
    fn symlink_metadata(&self, path: &Path) -> Result<Metadata, FsError>;
    fn remove_file(&self, path: &Path) -> Result<(), FsError>;
    fn new_open_options(&self) -> OpenOptions<'_>;
    fn mount(
        &self,
        name: String,
        path: &Path,
        fs: Box<dyn FileSystem + Send + Sync>,
    ) -> Result<(), FsError>;
}

Required Methods§

fn read_dir(&self, path: &Path) -> Result<ReadDir, FsError>

fn create_dir(&self, path: &Path) -> Result<(), FsError>

fn remove_dir(&self, path: &Path) -> Result<(), FsError>

fn rename<'a>( &'a self, from: &'a Path, to: &'a Path, ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>

fn metadata(&self, path: &Path) -> Result<Metadata, FsError>

This method gets metadata without following symlinks in the path. Currently identical to metadata because symlinks aren’t implemented yet.

fn remove_file(&self, path: &Path) -> Result<(), FsError>

fn new_open_options(&self) -> OpenOptions<'_>

fn mount( &self, name: String, path: &Path, fs: Box<dyn FileSystem + Send + Sync>, ) -> Result<(), FsError>

Implementations§

§

impl dyn FileSystem

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: 'static,

pub fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: 'static,

Implementors§

source§

impl FileSystem for WasiFsRoot

source§

impl FileSystem for FallbackFileSystem

§

impl FileSystem for ArcFileSystem

§

impl FileSystem for EmptyFileSystem

§

impl FileSystem for FileSystem

§

impl FileSystem for FileSystem

§

impl FileSystem for PassthruFileSystem

§

impl FileSystem for StaticFileSystem

§

impl FileSystem for TmpFileSystem

§

impl FileSystem for UnionFileSystem

§

impl FileSystem for WebcVolumeFileSystem

§

impl<D, F> FileSystem for D
where D: Deref<Target = F> + Debug + Send + Sync + 'static, F: FileSystem + ?Sized,

§

impl<F> FileSystem for TraceFileSystem<F>
where F: FileSystem,

source§

impl<F: FileSystem> FileSystem for RelativeOrAbsolutePathHack<F>

source§

impl<M, F> FileSystem for MappedPathFileSystem<F, M>
where F: FileSystem, M: Fn(&Path) -> Result<PathBuf, FsError> + Send + Sync + 'static,

§

impl<P, S> FileSystem for OverlayFileSystem<P, S>
where P: FileSystem + Send + 'static, S: for<'a> FileSystems<'a> + Send + Sync + 'static, <<S as FileSystems<'a>>::Iter as IntoIterator>::IntoIter: for<'a> Send,