extern structstd.os.linux.Statx[src]

Renamed to Statx to not conflict with the statx function.

Fields

mask: u32

Mask of bits indicating filled fields

blksize: u32

Block size for filesystem I/O

attributes: u64

Extra file attribute indicators

nlink: u32

Number of hard links

uid: uid_t

User ID of owner

gid: gid_t

Group ID of owner

mode: u16

File type and mode

__pad1: u16
ino: u64

Inode number

size: u64

Total size in bytes

blocks: u64

Number of 512B blocks allocated

attributes_mask: u64

Mask to show what's supported in attributes.

atime: statx_timestamp

Last access file timestamp

btime: statx_timestamp

Creation file timestamp

ctime: statx_timestamp

Last status change file timestamp

mtime: statx_timestamp

Last modification file timestamp

rdev_major: u32

Major ID, if this file represents a device.

rdev_minor: u32

Minor ID, if this file represents a device.

dev_major: u32

Major ID of the device containing the filesystem where this file resides.

dev_minor: u32

Minor ID of the device containing the filesystem where this file resides.

__pad2: [14]u64

Source Code

Source code
pub const Statx = extern struct {
    /// Mask of bits indicating filled fields
    mask: u32,

    /// Block size for filesystem I/O
    blksize: u32,

    /// Extra file attribute indicators
    attributes: u64,

    /// Number of hard links
    nlink: u32,

    /// User ID of owner
    uid: uid_t,

    /// Group ID of owner
    gid: gid_t,

    /// File type and mode
    mode: u16,
    __pad1: u16,

    /// Inode number
    ino: u64,

    /// Total size in bytes
    size: u64,

    /// Number of 512B blocks allocated
    blocks: u64,

    /// Mask to show what's supported in `attributes`.
    attributes_mask: u64,

    /// Last access file timestamp
    atime: statx_timestamp,

    /// Creation file timestamp
    btime: statx_timestamp,

    /// Last status change file timestamp
    ctime: statx_timestamp,

    /// Last modification file timestamp
    mtime: statx_timestamp,

    /// Major ID, if this file represents a device.
    rdev_major: u32,

    /// Minor ID, if this file represents a device.
    rdev_minor: u32,

    /// Major ID of the device containing the filesystem where this file resides.
    dev_major: u32,

    /// Minor ID of the device containing the filesystem where this file resides.
    dev_minor: u32,

    __pad2: [14]u64,
}