[−][src]Struct mft::attribute::x30::FileNameAttr
Fields
parent: MftReference
created: DateTime<Utc>
modified: DateTime<Utc>
mft_modified: DateTime<Utc>
accessed: DateTime<Utc>
logical_size: u64
physical_size: u64
flags: FileAttributeFlags
reparse_value: u32
name_length: u8
namespace: FileNamespace
name: String
Methods
impl FileNameAttr
[src]
pub fn from_stream<S: ReadSeek>(stream: &mut S) -> Result<FileNameAttr>
[src]
Parse a Filename attrbiute buffer.
Example
Parse a raw buffer.
use mft::attribute::x30::{FileNameAttr, FileNamespace}; 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 = FileNameAttr::from_stream(&mut Cursor::new(attribute_buffer)).unwrap(); assert_eq!(attribute.parent.entry, 5); assert_eq!(attribute.created.timestamp(), 1370144608); assert_eq!(attribute.modified.timestamp(), 1370144608); assert_eq!(attribute.mft_modified.timestamp(), 1370144608); assert_eq!(attribute.accessed.timestamp(), 1370144608); assert_eq!(attribute.logical_size, 67108864); assert_eq!(attribute.physical_size, 67108864); assert_eq!(attribute.flags.bits(), 6); assert_eq!(attribute.reparse_value, 0); assert_eq!(attribute.name_length, 8); assert_eq!(attribute.namespace, FileNamespace::Win32AndDos); assert_eq!(attribute.name, "$LogFile");
Trait Implementations
impl Clone for FileNameAttr
[src]
fn clone(&self) -> 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
impl Send for FileNameAttr
impl Sync for FileNameAttr
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,