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 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 symlink_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.