Skip to main content

FileOperation

Enum FileOperation 

Source
pub enum FileOperation {
Show 14 variants Create, Delete, Rename, IndexInsert, IndexDelete, AttributeCreate, AttributeDelete, Resize, DataWrite, BitmapAllocation, TransactionControl, TableDump, Noop, Unknown(u16, u16),
}
Expand description

A higher-level file operation reconstructed from a $LogFile LFS record’s (redo, undo) operation pair.

The taxonomy follows the structural mutation each redo opcode performs (see the module docs for the per-opcode source citations). It is deliberately coarse: one variant per class of on-disk effect a forensic timeline cares about, not one per raw opcode (that vocabulary is LogOp).

Variants§

§

Create

A file record segment was initialized — a new MFT entry, i.e. file/dir creation (InitializeFileRecordSegment, redo 0x02).

§

Delete

A file record segment was freed — file/dir deletion (DeallocateFileRecordSegment, redo 0x03).

§

Rename

A $FILE_NAME in a directory index was updated in place — a rename / move (or an in-index timestamp/size update). UpdateFileNameRoot (0x13) / UpdateFileNameAllocation (0x14), each self-paired.

§

IndexInsert

A name was inserted into a directory index — the create side of a link/rename. AddIndexEntryRoot (0x0C) / AddIndexEntryAllocation (0x0E).

§

IndexDelete

A name was removed from a directory index — the delete side of an unlink/rename. DeleteIndexEntryRoot (0x0D) / DeleteIndexEntryAllocation (0x0F).

§

AttributeCreate

A new attribute was added to a file record (CreateAttribute, 0x05).

§

AttributeDelete

An attribute was removed from a file record (DeleteAttribute, 0x06).

§

Resize

An attribute’s logical/allocated/initialized sizes changed — a file resize (SetNewAttributeSizes, 0x0B).

§

DataWrite

Attribute data (resident or non-resident) was written: a content update, run-list / VCN mapping change, or index-buffer write. UpdateResidentValue (0x07), UpdateNonResidentValue (0x08), UpdateMappingPairs (0x09), WriteEndOfFileRecordSegment (0x04), WriteEndOfIndexBuffer (0x10), SetIndexEntryVcnRoot (0x11), SetIndexEntryVcnAllocation (0x12), UpdateRecordDataRoot (0x21), UpdateRecordDataAllocation (0x22).

§

BitmapAllocation

A cluster/MFT-allocation bitmap bit was set, cleared, or clusters marked dirty — space (de)allocation. SetBitsInNonResidentBitMap (0x15), ClearBitsInNonResidentBitMap (0x16), DeleteDirtyClusters (0x0A).

§

TransactionControl

Transaction-boundary control, not an on-disk file mutation: EndTopLevelAction (0x18), PrepareTransaction (0x19), CommitTransaction (0x1A), ForgetTransaction (0x1B), CompensationLogRecord (0x01).

§

TableDump

A restart-area / open-attribute-table / dirty-page / transaction-table dump or hot-fix — log housekeeping that records no file change. HotFix (0x17), OpenNonResidentAttribute (0x1C), OpenAttributeTableDump (0x1D), AttributeNamesDump (0x1E), DirtyPageTableDump (0x1F), TransactionTableDump (0x20).

§

Noop

A no-op log record (Noop, redo 0x00 with no undo effect).

§

Unknown(u16, u16)

The (redo, undo) opcode pair is not a recognised file operation. The raw codes are surfaced verbatim — (redo_code, undo_code) — so an investigator can identify the operation themselves (never dropped).

Implementations§

Source§

impl FileOperation

Source

pub fn classify(record: &LogRecord) -> Self

Classify a single decoded LFS LogRecord into its file operation.

The redo opcode names the operation; the undo opcode is the inverse the recovery pass would apply. A Noop redo paired with a substantive undo (the form NTFS uses to log a pure deallocation) is classified by the undo. Any pair outside the documented map yields FileOperation::Unknown carrying both raw codes.

Trait Implementations§

Source§

impl Clone for FileOperation

Source§

fn clone(&self) -> FileOperation

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 Copy for FileOperation

Source§

impl Debug for FileOperation

Source§

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

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

impl Eq for FileOperation

Source§

impl PartialEq for FileOperation

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FileOperation

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.