pub struct Fs;
Implementations§
Source§impl Fs
impl Fs
pub async fn create_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub async fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub async fn metadata<P: AsRef<Path>>(&self, path: P) -> Result<Metadata>
pub async fn symlink_metadata<P: AsRef<Path>>( &self, path: P, ) -> Result<Metadata>
pub async fn rename<P: AsRef<Path>, Q: AsRef<Path>>( &self, from: P, to: Q, ) -> Result<()>
pub async fn copy<P: AsRef<Path>, Q: AsRef<Path>>( &self, from: P, to: Q, ) -> Result<u64>
pub async fn remove_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub async fn remove_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub async fn remove_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub async fn write<P: AsRef<Path>, C: AsRef<[u8]>>( &self, path: P, contents: C, ) -> Result<()>
pub async fn read<P: AsRef<Path>>(&self, path: P) -> Result<Vec<u8>>
pub async fn read_to_string<P: AsRef<Path>>(&self, path: P) -> Result<String>
pub async fn read_to_string_if_exists<P: AsRef<Path>>( &self, path: P, ) -> Result<Option<String>>
pub async fn read_link<P: AsRef<Path>>(&self, path: P) -> Result<PathBuf>
pub async fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>( &self, original: P, link: Q, ) -> Result<()>
pub async fn open_file<P: AsRef<Path>>(&self, path: P) -> Result<File>
pub async fn open_or_create_file<P: AsRef<Path>>(&self, path: P) -> Result<File>
pub async fn open_or_create_file_append<P: AsRef<Path>>( &self, path: P, ) -> Result<File>
pub async fn create_file<P: AsRef<Path>>(&self, path: P) -> Result<File>
pub async fn create_file_read_write<P: AsRef<Path>>( &self, path: P, ) -> Result<File>
pub async fn open_or_create_file_read_write<P: AsRef<Path>>( &self, path: P, ) -> Result<File>
pub async fn canonicalize<P: AsRef<Path>>(&self, path: P) -> Result<PathBuf>
pub async fn exists<P: AsRef<Path>>(&self, path: P) -> bool
pub async fn read_dir<P: AsRef<Path>>(&self, path: P) -> Result<ReadDir>
pub fn glob_walk<'fs, 'glob, P: AsRef<Path>>( &'fs self, path: P, glob: &'glob GlobSet, ) -> GlobWalker<'fs, 'glob>
Auto Trait Implementations§
impl Freeze for Fs
impl RefUnwindSafe for Fs
impl Send for Fs
impl Sync for Fs
impl Unpin for Fs
impl UnwindSafe for Fs
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more