Struct mft::attribute::x10::StandardInfoAttr
source · 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: u32
§version: u32
§class_id: u32
§owner_id: u32
§security_id: u32
§quota: u64
§usn: u64
Implementations§
source§impl StandardInfoAttr
impl StandardInfoAttr
sourcepub fn from_reader<S: Read + Seek>(reader: &mut S) -> Result<StandardInfoAttr>
pub fn from_reader<S: Read + Seek>(reader: &mut S) -> Result<StandardInfoAttr>
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§
source§impl Clone for StandardInfoAttr
impl Clone for StandardInfoAttr
source§fn clone(&self) -> StandardInfoAttr
fn clone(&self) -> StandardInfoAttr
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more