pub struct RomFs<R: Read + Seek> { /* private fields */ }
Expand description
RomFS representation
Implementations§
Source§impl<R: Read + Seek> RomFs<R>
impl<R: Read + Seek> RomFs<R>
Sourcepub const INVALID_ENTRY: u32 = 4_294_967_295u32
pub const INVALID_ENTRY: u32 = 4_294_967_295u32
Magic value for invalid entry offsets
Sourcepub const ROOT_DIR_OFFSET: u32 = 0u32
pub const ROOT_DIR_OFFSET: u32 = 0u32
Offset of the root directory
Sourcepub fn from_reader(reader: R) -> Result<Self, Error>
pub fn from_reader(reader: R) -> Result<Self, Error>
Create a new RomFS parser from a reader
pub fn list_files(&mut self) -> Result<Vec<FileEntry>, Error>
Sourcepub fn get_file_by_path(
&mut self,
path: &str,
) -> Result<Option<FileEntry>, Error>
pub fn get_file_by_path( &mut self, path: &str, ) -> Result<Option<FileEntry>, Error>
Find a file by its path
Sourcepub fn file_exists(&mut self, path: &str) -> bool
pub fn file_exists(&mut self, path: &str) -> bool
Check if a file exists by path
Sourcepub fn dir_exists(&mut self, path: &str) -> bool
pub fn dir_exists(&mut self, path: &str) -> bool
Check if a directory exists by path
Create a new RomFS parser from a shared reader
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for RomFs<R>where
R: Freeze,
impl<R> RefUnwindSafe for RomFs<R>where
R: RefUnwindSafe,
impl<R> Send for RomFs<R>where
R: Send,
impl<R> Sync for RomFs<R>where
R: Sync,
impl<R> Unpin for RomFs<R>where
R: Unpin,
impl<R> UnwindSafe for RomFs<R>where
R: UnwindSafe,
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