Skip to main content

stat

Struct stat 

Source
#[repr(C)]
pub struct stat {
Show 14 fields pub st_dev: dev_t, pub st_ino: ino_t, pub st_nlink: nlink_t, pub st_mode: mode_t, pub st_uid: uid_t, pub st_gid: gid_t, pub st_rdev: dev_t, pub st_size: off_t, pub st_blksize: blksize_t, pub st_blocks: blkcnt_t, pub st_atim: timespec, pub st_mtim: timespec, pub st_ctim: timespec, pub _pad: [c_char; 24],
}
Expand description

Fields§

§st_dev: dev_t

Device ID of device containing file.

§st_ino: ino_t

File serial number.

§st_nlink: nlink_t

Number of hard links to the file.

§st_mode: mode_t

Mode of file.

§st_uid: uid_t

User ID of file.

§st_gid: gid_t

Group ID of file.

§st_rdev: dev_t

Device ID (if file is character or block special).

§st_size: off_t

For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. For a shared or typed memory object, the length in bytes. For other file types, the use of this field is unspecified.

§st_blksize: blksize_t

A file system-specific preferred I/O block size for this object. In some file system types, this may vary from file to file.

§st_blocks: blkcnt_t

Number of blocks allocated for this object.

§st_atim: timespec

Last data access timestamp.

§st_mtim: timespec

Last data modification timestamp.

§st_ctim: timespec

Last file status change timestamp.

§_pad: [c_char; 24]

Trait Implementations§

Source§

impl Default for stat

Source§

fn default() -> stat

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for stat

§

impl RefUnwindSafe for stat

§

impl Send for stat

§

impl Sync for stat

§

impl Unpin for stat

§

impl UnsafeUnpin for stat

§

impl UnwindSafe for stat

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
§

impl<T> CastSlice<'_, T> for T

§

fn cast_slice(selves: &[T]) -> &[T]

§

impl<T> CastSliceMut<'_, T> for T

§

fn cast_slice_mut(selves: &mut [T]) -> &mut [T]

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 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.