pub struct FileSystem {
pub root: Arc<Mutex<Inode>>,
/* private fields */
}Expand description
The file system
Fields§
§root: Arc<Mutex<Inode>>Implementations§
Source§impl FileSystem
impl FileSystem
pub fn new() -> Self
pub fn get_user(&self, user_id: UserId) -> Option<&User>
pub fn get_group(&self, group_id: GroupId) -> Option<&Group>
pub fn create_file( &mut self, path: &str, ) -> Result<Arc<Mutex<Inode>>, ShellError>
pub fn create_directory( &mut self, path: &str, ) -> Result<Arc<Mutex<Inode>>, ShellError>
pub fn add_user(&mut self, username: &str) -> Result<UserId, ShellError>
pub fn find_absolute_inode(&self, path: &str) -> Option<Arc<Mutex<Inode>>>
pub fn remove_inode(&mut self, path: &str) -> Result<(), ShellError>
Trait Implementations§
Source§impl Clone for FileSystem
impl Clone for FileSystem
Source§impl Debug for FileSystem
impl Debug for FileSystem
Auto Trait Implementations§
impl Freeze for FileSystem
impl RefUnwindSafe for FileSystem
impl Send for FileSystem
impl Sync for FileSystem
impl Unpin for FileSystem
impl UnsafeUnpin for FileSystem
impl UnwindSafe for FileSystem
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