Struct os::fs::Stat

source · []
#[repr(C)]
pub struct Stat {
Show 16 fields st_dev: u64, st_ino: u64, st_mode: u32, st_nlink: u32, st_uid: u32, st_gid: u32, st_rdev: u64, __pad: u64, st_size: i64, st_blksize: u32, __pad2: i32, st_blocks: u64, st_atime: TimeSpec, st_mtime: TimeSpec, st_ctime: TimeSpec, __unused: u64,
}
Expand description

Store the file attributes from a supported file.

Fields

st_dev: u64

ID of device containing file

st_ino: u64

Inode number

st_mode: u32

File type and mode

st_nlink: u32

Number of hard links

st_uid: u32

User ID of the file’s owner.

st_gid: u32

Group ID of the file’s group.

st_rdev: u64

Device ID (if special file)

__pad: u64st_size: i64

Size of file, in bytes.

st_blksize: u32

Optimal block size for I/O.

__pad2: i32st_blocks: u64

Number 512-byte blocks allocated.

st_atime: TimeSpec

Backward compatibility. Used for time of last access.

st_mtime: TimeSpec

Time of last modification.

st_ctime: TimeSpec

Time of last status change.

__unused: u64

Implementations

Get the inode number described in the Stat

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.