pub struct RewindEngine { /* private fields */ }Expand description
The Rewind engine for full path reconstruction.
Implementations§
Source§impl RewindEngine
impl RewindEngine
Sourcepub fn from_mft<I>(mft_entries: I) -> Self
pub fn from_mft<I>(mft_entries: I) -> Self
Create a RewindEngine seeded with MFT entries.
The mft_entries iterator yields (entry_number, sequence, filename,
parent_entry, parent_sequence).
Sourcepub fn lookup_len(&self) -> usize
pub fn lookup_len(&self) -> usize
Number of entries in the lookup table.
Sourcepub fn seed_from_carved(&mut self, entries: &[CarvedMftEntry])
pub fn seed_from_carved(&mut self, entries: &[CarvedMftEntry])
Seed the engine with carved MFT entries from unallocated space.
Uses or_insert so carved entries never overwrite allocated MFT data
that was seeded via from_mft. Historical entries (different sequence
numbers from the same MFT entry) are added as new keys.
Sourcepub fn insert(&mut self, key: EntryKey, info: EntryInfo)
pub fn insert(&mut self, key: EntryKey, info: EntryInfo)
Insert or update an entry in the lookup table.
Sourcepub fn resolve_path(&self, key: &EntryKey) -> String
pub fn resolve_path(&self, key: &EntryKey) -> String
Resolve the full path for a given entry key.
Recursively follows parent references until reaching the root. Returns “.” as the root prefix (representing the volume root).
Sourcepub fn rewind(&mut self, records: &[UsnRecord]) -> Vec<ResolvedRecord>
pub fn rewind(&mut self, records: &[UsnRecord]) -> Vec<ResolvedRecord>
Process USN records using the Rewind algorithm.
Records MUST be sorted by USN/timestamp in ascending order (oldest first). This function processes them in reverse to build the lookup table, then resolves paths for each record in forward order.
Returns resolved records with full paths.