MioFileSystemDriver

Struct MioFileSystemDriver 

Source
pub struct MioFileSystemDriver;

Trait Implementations§

Source§

impl Driver for MioFileSystemDriver

Source§

fn open_file(&self, path: &Path, open_mode: FileOpenMode) -> Result<File>

Open new file with provided mode.
Source§

fn canonicalize(&self, path: &Path) -> Result<PathBuf>

Returns the canonical form of a path. The returned path is in absolute form with all intermediate components normalized and symbolic links resolved. This function is an async version of std::fs::canonicalize.
Source§

fn poll_copy( &self, _cx: &mut Context<'_>, from: &Path, to: &Path, ) -> Poll<Result<u64>>

Copies the contents and permissions of a file to a new location. On success, the total number of bytes copied is returned and equals the length of the to file after this operation. The old contents of to will be overwritten. If from and to both point to the same file, then the file will likely get truncated as a result of this operation.
Source§

fn poll_create_dir( &self, _cx: &mut Context<'_>, path: &Path, ) -> Poll<Result<()>>

Creates a new directory. Note that this function will only create the final directory in path. If you want to create all of its missing parent directories too, use the create_dir_all function instead. Read more
Source§

fn poll_create_dir_all( &self, _cx: &mut Context<'_>, path: &Path, ) -> Poll<Result<()>>

Creates a new directory and all of its parents if they are missing. This function is an async version of std::fs::create_dir_all.
Creates a hard link on the filesystem. The dst path will be a link pointing to the src path. Note that operating systems often require these two paths to be located on the same filesystem. Read more
Source§

fn poll_metadata( &self, _cx: &mut Context<'_>, path: &Path, ) -> Poll<Result<Metadata>>

Reads metadata for a path. This function will traverse symbolic links to read metadata for the target file or directory. If you want to read metadata without following symbolic links, use symlink_metadata instead. Read more
Reads a symbolic link and returns the path it points to. Read more
Source§

fn poll_remove_dir( &self, _cx: &mut Context<'_>, path: &Path, ) -> Poll<Result<()>>

Removes an empty directory, if the path is not an empty directory, use the function remove_dir_all instead. Read more
Source§

fn poll_remove_dir_all( &self, _cx: &mut Context<'_>, path: &Path, ) -> Poll<Result<()>>

Removes a directory and all of its contents. Read more
Source§

fn poll_remove_file( &self, _cx: &mut Context<'_>, path: &Path, ) -> Poll<Result<()>>

Removes a file. This function is an async version of std::fs::remove_file.
Source§

fn poll_rename( &self, _cx: &mut Context<'_>, from: &Path, to: &Path, ) -> Poll<Result<()>>

Renames a file or directory to a new location. If a file or directory already exists at the target location, it will be overwritten by this operation. This function is an async version of std::fs::rename.
Source§

fn poll_set_permissions( &self, _cx: &mut Context<'_>, path: &Path, perm: &Permissions, ) -> Poll<Result<()>>

Changes the permissions of a file or directory. This function is an async version of std::fs::set_permissions.
Reads metadata for a path without following symbolic links. If you want to follow symbolic links before reading metadata of the target file or directory, use metadata instead. Read more
Source§

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

Returns a iterator handle of entries in a directory.

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.