Skip to main content

DirEntry

Struct DirEntry 

Source
pub struct DirEntry {
Show 13 fields pub sid: u32, pub name: String, pub object_type: u8, pub color: u8, pub left: u32, pub right: u32, pub child: u32, pub clsid: [u8; 16], pub state_bits: u32, pub create_time: u64, pub modify_time: u64, pub start_sector: u32, pub stream_size: u64,
}
Expand description

A decoded 128-byte directory entry. Every field is read with bounds checks; a truncated entry yields zeroed / empty fields rather than a panic.

Fields§

§sid: u32

Index of this entry in the directory array (its stream id / SID).

§name: String

UTF-16LE name, lossily decoded and trimmed at the declared name length.

§object_type: u8

Raw object-type byte (0x00/0x01/0x02/0x05).

§color: u8

Raw colour byte (0x00 red / 0x01 black).

§left: u32

Left-sibling SID, or forensicnomicon::olecf::NOSTREAM.

§right: u32

Right-sibling SID, or NOSTREAM.

§child: u32

Child SID (storages only), or NOSTREAM.

§clsid: [u8; 16]

16-byte class id, verbatim.

§state_bits: u32

User-defined state bits.

§create_time: u64

Creation FILETIME (raw u64).

§modify_time: u64

Modification FILETIME (raw u64).

§start_sector: u32

Starting sector id of the entry’s stream (or mini-stream for the root).

§stream_size: u64

Declared stream size in bytes.

Implementations§

Source§

impl DirEntry

Source

pub fn is_allocated(&self) -> bool

True if this entry’s object type marks it as a live stream or storage (0x01/0x02/0x05) rather than an unallocated 0x00 slot.

Source

pub fn is_stream(&self) -> bool

True for a stream object (0x02).

Trait Implementations§

Source§

impl Clone for DirEntry

Source§

fn clone(&self) -> DirEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DirEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DirEntry

Source§

impl PartialEq for DirEntry

Source§

fn eq(&self, other: &DirEntry) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DirEntry

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.