#[repr(C)]pub struct DirEntry2 {
pub e2d_ino: U32,
pub e2d_reclen: U16,
pub e2d_namlen: u8,
pub e2d_type: u8,
pub e2d_name: [u8; 255],
}
Fields§
§e2d_ino: U32
INode number of entry
e2d_reclen: U16
Length of this record.
e2d_namlen: u8
Length of string in e2d_name
.
e2d_type: u8
File type of this entry.
e2d_name: [u8; 255]
Name of the entry.
Implementations§
Source§impl DirEntry2
impl DirEntry2
Sourcepub fn name(&self) -> Result<&str, ParsingError>
pub fn name(&self) -> Result<&str, ParsingError>
Name of the file/directory/entry as a string.
pub fn name_bytes(&self) -> &[u8] ⓘ
Sourcepub fn as_hash_map(
entries: Vec<DirEntry2>,
) -> Result<HashMap<String, DirEntry2>, ParsingError>
pub fn as_hash_map( entries: Vec<DirEntry2>, ) -> Result<HashMap<String, DirEntry2>, ParsingError>
Generate a hash table of the given directory entries.
Key: name of entry Value: DirEntry2 struct
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DirEntry2
impl RefUnwindSafe for DirEntry2
impl Send for DirEntry2
impl Sync for DirEntry2
impl Unpin for DirEntry2
impl UnwindSafe for DirEntry2
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