#[repr(C)]
pub struct statx {
Show 19 fields pub stx_mask: u32, pub stx_blksize: u32, pub stx_attributes: u64, pub stx_nlink: u32, pub stx_uid: u32, pub stx_gid: u32, pub stx_mode: u16, pub stx_ino: u64, pub stx_size: u64, pub stx_blocks: u64, pub stx_attributes_mask: u64, pub stx_atime: statx_timestamp, pub stx_btime: statx_timestamp, pub stx_ctime: statx_timestamp, pub stx_mtime: statx_timestamp, pub stx_rdev_major: u32, pub stx_rdev_minor: u32, pub stx_dev_major: u32, pub stx_dev_minor: u32, /* private fields */
}
Expand description

Structures for the extended file attribute retrieval system call (statx()).

The caller passes a mask of what they’re specifically interested in as a parameter to statx(). What statx() actually got will be indicated in st_mask upon return.

For each bit in the mask argument:

  • if the datum is not supported:

    • the bit will be cleared, and

    • the datum will be set to an appropriate fabricated value if one is available (eg. CIFS can take a default uid and gid), otherwise

    • the field will be cleared;

  • otherwise, if explicitly requested:

    • the datum will be synchronised to the server if AT_STATX_FORCE_SYNC is set or if the datum is considered out of date, and

    • the field will be filled in and the bit will be set;

  • otherwise, if not requested, but available in approximate form without any effort, it will be filled in anyway, and the bit will be set upon return (it might not be up to date, however, and no attempt will be made to synchronise the internal state first);

  • otherwise the field and the bit will be cleared before returning.

Items in STATX_BASIC_STATS may be marked unavailable on return, but they will have values installed for compatibility purposes so that stat() and co. can be emulated in userspace.

Fields

stx_mask: u32

What results were written [uncond]

stx_blksize: u32

Preferred general I/O size [uncond]

stx_attributes: u64

Flags conveying information about the file [uncond]

stx_nlink: u32

Number of hard links

stx_uid: u32

User ID of owner

stx_gid: u32

Group ID of owner

stx_mode: u16

File mode

stx_ino: u64

Inode number

stx_size: u64

File size

stx_blocks: u64

Number of 512-byte blocks allocated

stx_attributes_mask: u64

Mask to show what’s supported in stx_attributes

stx_atime: statx_timestampstx_btime: statx_timestampstx_ctime: statx_timestampstx_mtime: statx_timestampstx_rdev_major: u32

Device ID of special file [if bdev/cdev]

stx_rdev_minor: u32stx_dev_major: u32

ID of device containing file [uncond]

stx_dev_minor: u32

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

Returns the argument unchanged.

Calls U::from(self).

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

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.