pub struct FileName {
pub parent: FileReference,
pub created: Filetime,
pub modified: Filetime,
pub mft_modified: Filetime,
pub accessed: Filetime,
pub allocated_size: u64,
pub real_size: u64,
pub flags: u32,
pub namespace: u8,
pub name: String,
}Expand description
Parsed $FILE_NAME value.
Fields§
§parent: FileReferenceReference to the parent directory.
created: FiletimeCreation time.
modified: FiletimeFile content modification time.
mft_modified: FiletimeMFT record modification time.
accessed: FiletimeLast access time.
allocated_size: u64Allocated size of the file, in bytes.
real_size: u64Real (logical) size of the file, in bytes.
flags: u32FILE_ATTRIBUTE_* flags.
namespace: u8Namespace code (see forensicnomicon::ntfs::filename_namespace).
name: StringThe decoded file name.
Implementations§
Source§impl FileName
impl FileName
Sourcepub fn namespace_name(&self) -> Option<&'static str>
pub fn namespace_name(&self) -> Option<&'static str>
Human-readable namespace name, if recognised.
Sourcepub fn is_dos_namespace(&self) -> bool
pub fn is_dos_namespace(&self) -> bool
true if this is the short DOS (8.3) name — the one tools often omit
when listing, and which carries its own timestamps.
Sourcepub fn parse(content: &[u8]) -> Result<FileName>
pub fn parse(content: &[u8]) -> Result<FileName>
Parse a $FILE_NAME value from its resident content bytes.
§Errors
NtfsError::TooShort when smaller than the fixed header, or
NtfsError::BadAttribute when the name runs past the content.
Trait Implementations§
impl Eq for FileName
impl StructuralPartialEq for FileName
Auto Trait Implementations§
impl Freeze for FileName
impl RefUnwindSafe for FileName
impl Send for FileName
impl Sync for FileName
impl Unpin for FileName
impl UnsafeUnpin for FileName
impl UnwindSafe for FileName
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more