File size: 788 Bytes
d97ad4b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | use serde::{Serialize, Deserialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum FileKind {
File,
Directory,
}
#[derive(Debug, Clone)]
pub struct FileRecord {
pub file_ref: u64,
pub parent_ref: u64,
pub name: String,
pub kind: FileKind,
}
#[derive(Debug, Clone)]
pub struct NtfsDrive {
pub letter: char,
pub root: String,
pub device_path: String,
}
#[derive(Debug)]
pub enum IndexEvent {
Created(FileRecord),
Deleted(u64),
Renamed { old_ref: u64, new_record: FileRecord },
Moved { file_ref: u64, new_parent_ref: u64, name: String, kind: FileKind },
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JournalCheckpoint {
pub next_usn: i64,
pub journal_id: u64,
pub drive_letter: char,
} |