[][src]Struct statx_sys::statx

#[repr(C)]
pub struct statx { 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 __spare0: [__u16; 1], 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, pub __spare2: [__u64; 14], }

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

__spare0: [__u16; 1]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__spare2: [__u64; 14]

Spare space for future expansion

Trait Implementations

impl Copy for statx[src]

impl Debug for statx[src]

impl Clone for statx[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for statx

impl Sync for statx

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]