[][src]Struct mft::attribute::x10::StandardInfoAttr

pub struct StandardInfoAttr {
    pub created: DateTime<Utc>,
    pub modified: DateTime<Utc>,
    pub mft_modified: DateTime<Utc>,
    pub accessed: DateTime<Utc>,
    pub file_flags: FileAttributeFlags,
    pub max_version: u32,
    pub version: u32,
    pub class_id: u32,
    pub owner_id: u32,
    pub security_id: u32,
    pub quota: u64,
    pub usn: u64,
}

Fields

created: DateTime<Utc>modified: DateTime<Utc>mft_modified: DateTime<Utc>accessed: DateTime<Utc>file_flags: FileAttributeFlags

DOS File Permissions

max_version: u32version: u32class_id: u32owner_id: u32security_id: u32quota: u64usn: u64

Methods

impl StandardInfoAttr[src]

pub fn from_reader<S: ReadSeek>(reader: &mut S) -> Result<StandardInfoAttr>[src]

Parse a Standard Information attrbiute buffer.

Example

Parse a raw buffer.

use mft::attribute::x10::StandardInfoAttr;
use mft::attribute::FileAttributeFlags;
let attribute_buffer: &[u8] = &[
	0x2F,0x6D,0xB6,0x6F,0x0C,0x97,0xCE,0x01,0x56,0xCD,0x1A,0x75,0x73,0xB5,0xCE,0x01,
	0x56,0xCD,0x1A,0x75,0x73,0xB5,0xCE,0x01,0x56,0xCD,0x1A,0x75,0x73,0xB5,0xCE,0x01,
	0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0xB0,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x68,0x58,0xA0,0x0A,0x02,0x00,0x00,0x00
];

let attribute = StandardInfoAttr::from_reader(&mut Cursor::new(attribute_buffer)).unwrap();

assert_eq!(attribute.created.timestamp(), 1376278290);
assert_eq!(attribute.modified.timestamp(), 1379621073);
assert_eq!(attribute.mft_modified.timestamp(), 1379621073);
assert_eq!(attribute.accessed.timestamp(), 1379621073);
assert_eq!(attribute.file_flags.bits(), 32);
assert_eq!(attribute.max_version, 0);
assert_eq!(attribute.version, 0);
assert_eq!(attribute.class_id, 0);
assert_eq!(attribute.security_id, 1456);
assert_eq!(attribute.quota, 0);
assert_eq!(attribute.usn, 8768215144);

Trait Implementations

impl Clone for StandardInfoAttr[src]

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

Performs copy-assignment from source. Read more

impl Debug for StandardInfoAttr[src]

impl Serialize for StandardInfoAttr[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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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]