pub struct MioFileSystemDriver;Trait Implementations§
Source§impl Driver for MioFileSystemDriver
impl Driver for MioFileSystemDriver
Source§fn open_file(&self, path: &Path, open_mode: FileOpenMode) -> Result<File>
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>
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>>
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<()>>
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 moreSource§fn poll_create_dir_all(
&self,
_cx: &mut Context<'_>,
path: &Path,
) -> Poll<Result<()>>
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.Source§fn poll_hard_link(
&self,
_cx: &mut Context<'_>,
from: &Path,
to: &Path,
) -> Poll<Result<()>>
fn poll_hard_link( &self, _cx: &mut Context<'_>, from: &Path, to: &Path, ) -> Poll<Result<()>>
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>>
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
Source§fn poll_read_link(
&self,
_cx: &mut Context<'_>,
path: &Path,
) -> Poll<Result<PathBuf>>
fn poll_read_link( &self, _cx: &mut Context<'_>, path: &Path, ) -> Poll<Result<PathBuf>>
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<()>>
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 moreSource§fn poll_remove_dir_all(
&self,
_cx: &mut Context<'_>,
path: &Path,
) -> Poll<Result<()>>
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<()>>
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<()>>
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<()>>
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.