pub struct Cpiofs {
name: &'static str,
entries: Mutex<Vec<CpiofsEntry>>,
mounted: bool,
mount_point: String,
}
Expand description
Structure representing the entire Initramfs
Fields§
§name: &'static str
§entries: Mutex<Vec<CpiofsEntry>>
§mounted: bool
§mount_point: String
Implementations§
Source§impl Cpiofs
impl Cpiofs
Sourcefn parse_cpio(cpio_data: &[u8]) -> Result<Vec<CpiofsEntry>>
fn parse_cpio(cpio_data: &[u8]) -> Result<Vec<CpiofsEntry>>
fn normalize_path(&self, path: &str) -> String
Trait Implementations§
Source§impl FileOperations for Cpiofs
impl FileOperations for Cpiofs
Source§fn open(&self, path: &str, _flags: u32) -> Result<Arc<dyn FileHandle>>
fn open(&self, path: &str, _flags: u32) -> Result<Arc<dyn FileHandle>>
Open a file
Source§fn read_dir(&self, _path: &str) -> Result<Vec<DirectoryEntry>>
fn read_dir(&self, _path: &str) -> Result<Vec<DirectoryEntry>>
Read directory entries
Source§fn create_file(&self, _path: &str, _file_type: FileType) -> Result<()>
fn create_file(&self, _path: &str, _file_type: FileType) -> Result<()>
Create a file with the specified type. Read more
Source§fn create_dir(&self, _path: &str) -> Result<()>
fn create_dir(&self, _path: &str) -> Result<()>
Create a directory
Source§fn metadata(&self, path: &str) -> Result<FileMetadata>
fn metadata(&self, path: &str) -> Result<FileMetadata>
Get the metadata
Auto Trait Implementations§
impl !Freeze for Cpiofs
impl !RefUnwindSafe for Cpiofs
impl Send for Cpiofs
impl Sync for Cpiofs
impl Unpin for Cpiofs
impl UnwindSafe for Cpiofs
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more