pub struct BlkFS { /* private fields */ }Expand description
The persistent block-backed filesystem.
Implementations§
Source§impl BlkFS
impl BlkFS
Sourcepub fn create(dev: Arc<dyn BlockDevice>) -> Result<BlkFS, FileError>
pub fn create(dev: Arc<dyn BlockDevice>) -> Result<BlkFS, FileError>
Create a new BlkFS on the given block device, formatting it.
Sourcepub fn open(dev: Arc<dyn BlockDevice>) -> Result<BlkFS, FileError>
pub fn open(dev: Arc<dyn BlockDevice>) -> Result<BlkFS, FileError>
Open an existing BlkFS on the given device (no formatting).
pub fn device(&self) -> Arc<dyn BlockDevice> ⓘ
pub fn sync(&self) -> Result<(), FileError>
Sourcepub fn root_inode(&self) -> Result<BlkInode, FileError>
pub fn root_inode(&self) -> Result<BlkInode, FileError>
Get the root inode.
Sourcepub fn create_file(
&self,
parent: &mut BlkInode,
name: &str,
) -> Result<BlkInode, FileError>
pub fn create_file( &self, parent: &mut BlkInode, name: &str, ) -> Result<BlkInode, FileError>
Create a regular file in a parent directory.
Sourcepub fn create_directory(
&self,
parent: &mut BlkInode,
name: &str,
) -> Result<BlkInode, FileError>
pub fn create_directory( &self, parent: &mut BlkInode, name: &str, ) -> Result<BlkInode, FileError>
Create a directory in a parent directory.
Auto Trait Implementations§
impl !Freeze for BlkFS
impl !RefUnwindSafe for BlkFS
impl !UnwindSafe for BlkFS
impl Forget for BlkFS
impl Send for BlkFS
impl Sync for BlkFS
impl Unpin for BlkFS
impl UnsafeUnpin for BlkFS
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