[][src]Struct mft::attr_x30::FileNameAttr

pub struct FileNameAttr {
    pub parent: MftReference,
    pub created: DateTime<Utc>,
    pub modified: DateTime<Utc>,
    pub mft_modified: DateTime<Utc>,
    pub accessed: DateTime<Utc>,
    pub logical_size: u64,
    pub physical_size: u64,
    pub flags: u32,
    pub reparse_value: u32,
    pub name_length: u8,
    pub namespace: u8,
    pub name: String,
    pub fullname: Option<String>,
}

Fields

parent: MftReferencecreated: DateTime<Utc>modified: DateTime<Utc>mft_modified: DateTime<Utc>accessed: DateTime<Utc>logical_size: u64physical_size: u64flags: u32reparse_value: u32name_length: u8namespace: u8name: Stringfullname: Option<String>

Methods

impl FileNameAttr[src]

pub fn from_reader<R: Read>(reader: &mut R) -> Result<FileNameAttr>[src]

Parse a Filename attrbiute buffer.

Example

Parse a raw buffer.

use rustymft::attr_x30::FileNameAttr;
let attribute_buffer: &[u8] = &[
	0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0xD5,0x2D,0x48,0x58,0x43,0x5F,0xCE,0x01,
	0xD5,0x2D,0x48,0x58,0x43,0x5F,0xCE,0x01,0xD5,0x2D,0x48,0x58,0x43,0x5F,0xCE,0x01,
	0xD5,0x2D,0x48,0x58,0x43,0x5F,0xCE,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x08,0x03,0x24,0x00,0x4C,0x00,0x6F,0x00,0x67,0x00,0x46,0x00,0x69,0x00,0x6C,0x00,
	0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00
];

let attribute = match FileNameAttr::new(attribute_buffer) {
	Ok(attribute) => attribute,
	Err(error) => panic!(error)
};

assert_eq!(attribute.parent.0, 1407374883553285);
assert_eq!(attribute.created.0, 130146182088895957);
assert_eq!(attribute.modified.0, 130146182088895957);
assert_eq!(attribute.mft_modified.0, 130146182088895957);
assert_eq!(attribute.accessed.0, 130146182088895957);
assert_eq!(attribute.logical_size, 67108864);
assert_eq!(attribute.physical_size, 67108864);
assert_eq!(attribute.flags, 6);
assert_eq!(attribute.reparse_value, 0);
assert_eq!(attribute.name_length, 8);
assert_eq!(attribute.namespace, 3);
assert_eq!(attribute.name, "$LogFile");

Trait Implementations

impl Clone for FileNameAttr[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for FileNameAttr[src]

impl Serialize for FileNameAttr[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]