pub struct TokioFs {}Available on crate feature
tokio-rt only.Expand description
tokio’s abstraction of a Filesystem.
Trait Implementations§
Source§impl Filesystem for TokioFs
impl Filesystem for TokioFs
type ReadDir = ReadDirStream
type DirEntry = DirEntry
Source§fn canonicalize<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
fn canonicalize<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
Returns the canonical form of a path. Read more
Source§fn copy<'async_trait, S, D>(
from: S,
to: D,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
fn copy<'async_trait, S, D>( from: S, to: D, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
Copies the contents and permissions of a file to a new location. Read more
Source§fn create_dir<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn create_dir<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Creates a new directory. Read more
Source§fn create_dir_all<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn create_dir_all<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Creates a new directory and all of its parents if they are missing. Read more
Source§fn hard_link<'async_trait, S, D>(
from: S,
to: D,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn hard_link<'async_trait, S, D>( from: S, to: D, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Creates a hard link on the filesystem. Read more
Source§fn metadata<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<Metadata>> + Send + 'async_trait>>
fn metadata<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<Metadata>> + Send + 'async_trait>>
Reads metadata for a path. Read more
Source§fn read<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
fn read<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
Reads the entire contents of a file as raw bytes. Read more
Source§fn read_dir<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<Self::ReadDir>> + Send + 'async_trait>>
fn read_dir<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<Self::ReadDir>> + Send + 'async_trait>>
Returns a stream of entries in a directory. Read more
Source§fn read_link<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
fn read_link<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
Reads a symbolic link and returns the path it points to. Read more
Source§fn read_to_string<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
fn read_to_string<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
Reads the entire contents of a file as a string. Read more
Source§fn remove_dir<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn remove_dir<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Removes an empty directory. Read more
Source§fn remove_dir_all<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn remove_dir_all<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Removes a directory and all of its contents. Read more
Source§fn remove_file<'async_trait, P>(
path: P,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn remove_file<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Removes a file. Read more
Source§fn rename<'async_trait, O, N>(
from: O,
to: N,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn rename<'async_trait, O, N>( from: O, to: N, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Renames a file or directory to a new location. Read more
Source§fn set_permissions<'async_trait, P>(
path: P,
perm: Permissions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn set_permissions<'async_trait, P>( path: P, perm: Permissions, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Changes the permissions of a file or directory. Read more
impl Copy for TokioFs
impl Eq for TokioFs
impl StructuralPartialEq for TokioFs
Auto Trait Implementations§
impl Freeze for TokioFs
impl RefUnwindSafe for TokioFs
impl Send for TokioFs
impl Sync for TokioFs
impl Unpin for TokioFs
impl UnwindSafe for TokioFs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more