Skip to main content

FileMetadata

Struct FileMetadata 

Source
pub struct FileMetadata {
Show 15 fields pub kind: FileType, pub size: u64, pub mode: Option<u32>, pub device: Option<u64>, pub inode: Option<u64>, pub links: Option<u64>, pub uid: Option<u32>, pub gid: Option<u32>, pub rdev: Option<u64>, pub block_size: Option<u64>, pub blocks: Option<u64>, pub accessed: Option<FileTime>, pub modified: Option<FileTime>, pub changed: Option<FileTime>, pub created: Option<FileTime>,
}
Expand description

Metadata for Node Stats and watchFile snapshots. A field the platform does not report is None; values are never invented. Windows mode follows libuv’s attribute mapping: type bits plus 0o666, or 0o444 when read-only.

Fields§

§kind: FileType

File type.

§size: u64

Length in bytes.

§mode: Option<u32>

Mode including type bits.

§device: Option<u64>

Device (Windows: volume serial number).

§inode: Option<u64>

Inode (Windows: file index).

§links: Option<u64>

Hard-link count.

§uid: Option<u32>

Owner user id.

§gid: Option<u32>

Owner group id.

§rdev: Option<u64>

Device id of a special file.

§block_size: Option<u64>

Preferred I/O block size.

§blocks: Option<u64>

Allocated 512-byte blocks.

§accessed: Option<FileTime>

Last access.

§modified: Option<FileTime>

Last content modification.

§changed: Option<FileTime>

Last status change.

§created: Option<FileTime>

Creation (birth) time.

Trait Implementations§

Source§

impl Clone for FileMetadata

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for FileMetadata

Source§

impl Debug for FileMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FileMetadata

Source§

impl PartialEq for FileMetadata

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FileMetadata

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.