Struct maelstrom_util::async_fs::Fs
source · 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