Skip to main content

IoExe

Struct IoExe 

Source
pub struct IoExe;
Expand description

Access to the path where the exe is stored.

Trait Implementations§

Source§

impl Debug for IoExe

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IoExe

Source§

fn default() -> IoExe

Returns the “default value” for a type. Read more
Source§

impl FileSystemIsolated for IoExe

Source§

type HostFileSystem = IoGlobal

Source§

fn isolated_root(&mut self) -> PathBuf

The root of this isolated file system. Cant only read and write file/dir inside this root.
Source§

fn non_isolated_file_system() -> Self::HostFileSystem

Source§

fn validate_path<P: AsRef<Path>>(&mut self, path: P) -> IoResult<PathBuf>

Validates that a path is within the isolated root. Returns an error if the path escapes the root.
Source§

impl FileSystemProvider for IoExe

Auto Trait Implementations§

§

impl Freeze for IoExe

§

impl RefUnwindSafe for IoExe

§

impl Send for IoExe

§

impl Sync for IoExe

§

impl Unpin for IoExe

§

impl UnsafeUnpin for IoExe

§

impl UnwindSafe for IoExe

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyAsync for T
where T: Any + WasmSendSync + 'static,

Source§

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

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl<T> Async for T
where T: WasmSend + WasmSync + 'static,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DefaultIsTripleUnderscore for T
where T: Default,

Source§

fn ___() -> T

The Self::default() method. Read more
Source§

impl<F> FileSystem for F
where F: FileSystemDynWrite + FileSystemDynRead,

Source§

impl<T> FileSystemRead for T
where T: FileSystemDynRead,

Source§

fn exist<P: AsRef<Path>>(&mut self, path: P) -> bool

Resolve the path anc check if it exist.
Source§

fn try_exist<P: AsRef<Path>>(&mut self, path: P) -> IoResult<bool>

Resolve the path anc check if it exist.
Source§

fn exist_at<P: AsRef<Path>>(&mut self, path: P) -> bool

Check if the path exist.
Source§

fn try_exist_at<P: AsRef<Path>>(&mut self, path: P) -> IoResult<bool>

Check if the path exist.
Source§

fn read_bytes_at<P: AsRef<Path>>( &mut self, path: P, ) -> IoResult<Cow<'static, [u8]>>

Read the file at path.
Source§

fn read_dir_at<P: AsRef<Path>>( &mut self, path: P, ) -> IoResult<Vec<IoResult<PathBuf>>>

Read the contents of a directory at the given path.
Read the link at the given path.
Source§

fn read_bytes<P: AsRef<Path>>( &mut self, path: P, ) -> IoResult<Cow<'static, [u8]>>

Read the file at the resolved path.
Source§

fn read_dir<P: AsRef<Path>>( &mut self, path: P, ) -> IoResult<Vec<IoResult<PathBuf>>>

Read the contents of a directory at the given resolved path.
Read the link at the given resolved path.
Source§

fn file_type_at<P: AsRef<Path>>(&mut self, path: P) -> IoResult<FileType>

Source§

fn file_type<P: AsRef<Path>>(&mut self, path: P) -> IoResult<FileType>

Source§

fn resolve_paths<P: AsRef<Path>>(&mut self, path: P) -> IoResult<Vec<PathBuf>>

Given a path to a file, return all occurence of the file on the disk with the same name, regardless of the extension. If the path already have an extension, return it.
Source§

fn resolve_path<P: AsRef<Path>>(&mut self, path: P) -> IoResult<PathBuf>

Resolve incomplete file extension by finding the matching file on disk. Returns an error if multiple files with the same stem exist or if the path is not valid. If no file exist with the same name, return Ok(path).
Source§

fn canonicalize<P: AsRef<Path>>(&mut self, path: P) -> IoResult<PathBuf>

Canonicalizes the path like std::fs::canonicalize, but works even if the file doesn’t exist. Returns an error when resolving above root (e.g., /..).
Source§

impl<T> FileSystemWrite for T
where T: FileSystem,

Source§

fn write_bytes_at<P: AsRef<Path>>(&mut self, path: P, value: &[u8]) -> IoResult

Write bytes at a file at the given path. If the file or any of the parent directory don’t exist, create it.
Source§

fn write_bytes<P: AsRef<Path>>( &mut self, path: P, value: &[u8], ) -> IoResult<PathBuf>

Write bytes at a file at the given resolved path. If the file or any of the parent directory don’t exist, create it.
Source§

fn create_dir<P: AsRef<Path>>(&mut self, path: P) -> IoResult

Create recursively all dir in the path. If any element is a file on the way, delete it.
Source§

fn remove_at<P: AsRef<Path>>(&mut self, path: P) -> IoResult

Remove any file or folder recursively at the path.
Source§

fn remove<P: AsRef<Path>>(&mut self, path: P) -> IoResult<PathBuf>

Remove any file or folder recursively at the resolved path.
Source§

fn rename_at<P: AsRef<Path>, Q: AsRef<Path>>( &mut self, from: P, to: Q, ) -> IoResult

Rename a file or directory at path to a new destination, replacing the original file if to already exists. Read more
Source§

fn rename<P: AsRef<Path>, Q: AsRef<Path>>( &mut self, from: P, to: Q, ) -> IoResult<PathBuf>

Rename a file or directory at the resolved path to a new destination, replacing the original file if to already exists. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HasMut<T> for T

Source§

fn retrive_mut(&mut self) -> &mut T

Source§

impl<T> HasRef<T> for T

Source§

fn retrive_ref(&self) -> &T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToDebug for T
where T: Debug,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmSend for T
where T: Send,

Source§

impl<T> WasmSendSync for T
where T: Send + Sync,

Source§

impl<T> WasmSync for T
where T: Sync,