Struct std::sys::windows::fs::FileAttr

source ·
pub struct FileAttr {
    attributes: c_ulong,
    creation_time: FILETIME,
    last_access_time: FILETIME,
    last_write_time: FILETIME,
    file_size: u64,
    reparse_tag: c_ulong,
    volume_serial_number: Option<u32>,
    number_of_links: Option<u32>,
    file_index: Option<u64>,
}

Fields§

§attributes: c_ulong§creation_time: FILETIME§last_access_time: FILETIME§last_write_time: FILETIME§file_size: u64§reparse_tag: c_ulong§volume_serial_number: Option<u32>§number_of_links: Option<u32>§file_index: Option<u64>

Implementations§

source§

impl FileAttr

source

pub fn size(&self) -> u64

source

pub fn perm(&self) -> FilePermissions

source

pub fn attrs(&self) -> u32

source

pub fn file_type(&self) -> FileType

source

pub fn modified(&self) -> Result<SystemTime>

source

pub fn accessed(&self) -> Result<SystemTime>

source

pub fn created(&self) -> Result<SystemTime>

source

pub fn modified_u64(&self) -> u64

source

pub fn accessed_u64(&self) -> u64

source

pub fn created_u64(&self) -> u64

source

pub fn volume_serial_number(&self) -> Option<u32>

source

pub fn file_index(&self) -> Option<u64>

Trait Implementations§

source§

impl Clone for FileAttr

source§

fn clone(&self) -> FileAttr

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl From<WIN32_FIND_DATAW> for FileAttr

source§

fn from(wfd: WIN32_FIND_DATAW) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.