pub struct NtfsIndex<'n, 'f, E>where
E: NtfsIndexEntryType,{ /* private fields */ }
Expand description
Helper structure to iterate over all entries of an index or find a specific one.
The E
type parameter of NtfsIndexEntryType
specifies the type of the index entries.
The most common one is NtfsFileNameIndex
for file name indexes, commonly known as “directories”.
Check out NtfsFile::directory_index
to return an NtfsIndex
object for a directory without
any hassles.
Implementations§
source§impl<'n, 'f, E> NtfsIndex<'n, 'f, E>where
E: NtfsIndexEntryType,
impl<'n, 'f, E> NtfsIndex<'n, 'f, E>where E: NtfsIndexEntryType,
sourcepub fn new(
index_root_item: NtfsAttributeItem<'n, 'f>,
index_allocation_item: Option<NtfsAttributeItem<'n, 'f>>
) -> Result<Self>
pub fn new( index_root_item: NtfsAttributeItem<'n, 'f>, index_allocation_item: Option<NtfsAttributeItem<'n, 'f>> ) -> Result<Self>
Creates a new NtfsIndex
object from a previously looked up NtfsIndexRoot
attribute
(contained in an NtfsAttributeItem
) and, in case of a large index, a matching
NtfsIndexAllocation
attribute (also contained in an NtfsAttributeItem
).
If you just want to look up files in a directory, check out NtfsFile::directory_index
,
which looks up the correct NtfsIndexRoot
and NtfsIndexAllocation
attributes for you.
sourcepub fn entries<'i>(&'i self) -> NtfsIndexEntries<'n, 'f, 'i, E>
pub fn entries<'i>(&'i self) -> NtfsIndexEntries<'n, 'f, 'i, E>
Returns an NtfsIndexEntries
iterator to perform an in-order traversal of this index.
sourcepub fn finder<'i>(&'i self) -> NtfsIndexFinder<'n, 'f, 'i, E>
pub fn finder<'i>(&'i self) -> NtfsIndexFinder<'n, 'f, 'i, E>
Returns an NtfsIndexFinder
structure to efficiently find an entry in this index.