pub struct FileSystem<'a> { /* private fields */ }Expand description
A buffer backed filesystem.
Implementations§
Source§impl<'a> FileSystem<'a>
impl<'a> FileSystem<'a>
Sourcepub fn mount_or_format(buffer: &'a mut [u8]) -> Result<Self>
pub fn mount_or_format(buffer: &'a mut [u8]) -> Result<Self>
Format the buffer if there is no MBR, and then mount it.
Sourcepub fn cd<P: AsRef<Path>>(&mut self, dir: P) -> Result<()>
pub fn cd<P: AsRef<Path>>(&mut self, dir: P) -> Result<()>
Navigates into the provided directory.
Sourcepub fn mkdir<P: AsRef<Path>>(&mut self, dir: P) -> Result<()>
pub fn mkdir<P: AsRef<Path>>(&mut self, dir: P) -> Result<()>
Creates the provided path recursively from the current directory.
Sourcepub fn rmdir<P: AsRef<Path>>(&mut self, dir: P) -> Result<()>
pub fn rmdir<P: AsRef<Path>>(&mut self, dir: P) -> Result<()>
Recursively removes the path and all its contents.
Sourcepub fn open<P: AsRef<Path>>(&mut self, path: P) -> Result<File>
pub fn open<P: AsRef<Path>>(&mut self, path: P) -> Result<File>
Opens the file at the specified path.
Auto Trait Implementations§
impl<'a> !Freeze for FileSystem<'a>
impl<'a> !RefUnwindSafe for FileSystem<'a>
impl<'a> !Send for FileSystem<'a>
impl<'a> !Sync for FileSystem<'a>
impl<'a> Unpin for FileSystem<'a>
impl<'a> !UnwindSafe for FileSystem<'a>
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