pub struct RamFS { /* private fields */ }Expand description
RamFS文件系统
管理inode分配和根目录
Implementations§
Source§impl RamFS
impl RamFS
pub fn new() -> RamFS
pub fn root(&self) -> Arc<Mutex<RamInode>> ⓘ
Sourcepub fn create_file(
&self,
parent: Arc<Mutex<RamInode>>,
name: String,
) -> Result<Arc<Mutex<RamInode>>, FileError>
pub fn create_file( &self, parent: Arc<Mutex<RamInode>>, name: String, ) -> Result<Arc<Mutex<RamInode>>, FileError>
Sourcepub fn create_directory(
&self,
parent: Arc<Mutex<RamInode>>,
name: String,
) -> Result<Arc<Mutex<RamInode>>, FileError>
pub fn create_directory( &self, parent: Arc<Mutex<RamInode>>, name: String, ) -> Result<Arc<Mutex<RamInode>>, FileError>
在父目录中创建目录
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RamFS
impl !RefUnwindSafe for RamFS
impl !UnwindSafe for RamFS
impl Forget for RamFS
impl Send for RamFS
impl Sync for RamFS
impl Unpin for RamFS
impl UnsafeUnpin for RamFS
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