[][src]Struct nc::types::statx_t

#[repr(C)]
pub struct statx_t {
    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_t,
    pub stx_btime: statx_timestamp_t,
    pub stx_ctime: statx_timestamp_t,
    pub stx_mtime: statx_timestamp_t,
    pub stx_rdev_major: u32,
    pub stx_rdev_minor: u32,
    pub stx_dev_major: u32,
    pub stx_dev_minor: u32,
    // some fields omitted
}

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_timestamp_t

Last access time

stx_btime: statx_timestamp_t

File creation time

stx_ctime: statx_timestamp_t

Last attribute change time

stx_mtime: statx_timestamp_t

Last data modification time

stx_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

Auto Trait Implementations

impl Unpin for statx_t

impl Send for statx_t

impl Sync for statx_t

Blanket Implementations

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

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, 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]