![license: MIT OR Apache-2.0](https://camo.githubusercontent.com/e0e94393c09ca55d455735682c34f49ecb18b67520981bb927354c96c54e0521/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f6c2f6e7466732d726561646572)
- Fast in-memory scan of all records in the $MFT
- Usn journal reader
// Open the C volume and its MFT.
// Must have elevated privileges or it will fail.
let volume = Volume::new("\\\\.\\C:")?;
let mft = Mft::new(volume)?;
// Iterate all files
mft.iterate_files(|file| {
// Can also use FileInfo::with_cache().
let info = FileInfo::new(mft, file);
// Available fields: name, path, is_directory, size, timestamps (created, accessed, modified).
});
let volume = Volume::new("\\\\?\\C:")?;
// With `JournalOptions` you can customize things like where to start reading from (beginning, end, specific point),
// the mask to use for the events and more.
let journal = Journal::new(volume, JournalOptions::default())?;
// Try to read some events.
// You can call `read_sized` to use a custom buffer size.
for result in journal.read()? {
// Available fields are: usn, timestamp, file_id, parent_id, reason, path.
}