pub struct File;Implementations§
Source§impl File
impl File
pub fn read(&self, path: String) -> Result<Vec<u8>, String>
pub fn write( &self, path: String, data: Vec<u8>, append: bool, ) -> Result<(), String>
pub fn list_dir(&self, path: String) -> Result<Vec<DirEntry>, String>
pub fn metadata(&self, path: String) -> Result<FileMetadata, String>
pub fn create_dir(&self, path: String, recursive: bool) -> Result<(), String>
pub fn remove_file(&self, path: String) -> Result<(), String>
pub fn remove_dir(&self, path: String, recursive: bool) -> Result<(), String>
pub fn rename(&self, from: String, to: String) -> Result<(), String>
pub fn copy( &self, from: String, to: String, recursive: bool, ) -> Result<(), String>
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnsafeUnpin for File
impl UnwindSafe for File
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