Class Statx

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class Statx extends Struct<Statx> implements NativeResource

 struct statx {
     __u32 stx_mask;
     __u32 stx_blksize;
     __u64 stx_attributes;
     __u32 stx_nlink;
     __u32 stx_uid;
     __u32 stx_gid;
     __u16 stx_mode;
     __u16 __spare0[1];
     __u64 stx_ino;
     __u64 stx_size;
     __u64 stx_blocks;
     __u64 stx_attributes_mask;
     {@link StatxTimestamp struct statx_timestamp} stx_atime;
     {@link StatxTimestamp struct statx_timestamp} stx_btime;
     {@link StatxTimestamp struct statx_timestamp} stx_ctime;
     {@link StatxTimestamp struct statx_timestamp} stx_mtime;
     __u32 stx_rdev_major;
     __u32 stx_rdev_minor;
     __u32 stx_dev_major;
     __u32 stx_dev_minor;
     __u64 stx_mnt_id;
     __u64 __spare2;
     __u64 __spare3[12];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STX_MASK

      public static final int STX_MASK
      The struct member offsets.
    • STX_BLKSIZE

      public static final int STX_BLKSIZE
      The struct member offsets.
    • STX_ATTRIBUTES

      public static final int STX_ATTRIBUTES
      The struct member offsets.
    • STX_UID

      public static final int STX_UID
      The struct member offsets.
    • STX_GID

      public static final int STX_GID
      The struct member offsets.
    • STX_MODE

      public static final int STX_MODE
      The struct member offsets.
    • __SPARE0

      public static final int __SPARE0
      The struct member offsets.
    • STX_INO

      public static final int STX_INO
      The struct member offsets.
    • STX_SIZE

      public static final int STX_SIZE
      The struct member offsets.
    • STX_BLOCKS

      public static final int STX_BLOCKS
      The struct member offsets.
    • STX_ATTRIBUTES_MASK

      public static final int STX_ATTRIBUTES_MASK
      The struct member offsets.
    • STX_ATIME

      public static final int STX_ATIME
      The struct member offsets.
    • STX_BTIME

      public static final int STX_BTIME
      The struct member offsets.
    • STX_CTIME

      public static final int STX_CTIME
      The struct member offsets.
    • STX_MTIME

      public static final int STX_MTIME
      The struct member offsets.
    • STX_RDEV_MAJOR

      public static final int STX_RDEV_MAJOR
      The struct member offsets.
    • STX_RDEV_MINOR

      public static final int STX_RDEV_MINOR
      The struct member offsets.
    • STX_DEV_MAJOR

      public static final int STX_DEV_MAJOR
      The struct member offsets.
    • STX_DEV_MINOR

      public static final int STX_DEV_MINOR
      The struct member offsets.
    • STX_MNT_ID

      public static final int STX_MNT_ID
      The struct member offsets.
    • __SPARE2

      public static final int __SPARE2
      The struct member offsets.
    • __SPARE3

      public static final int __SPARE3
      The struct member offsets.
  • Constructor Details

    • Statx

      public Statx(ByteBuffer container)
      Creates a Statx instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<Statx>
    • stx_mask

      public int stx_mask()
      Returns:
      the value of the stx_mask field.
    • stx_blksize

      public int stx_blksize()
      Returns:
      the value of the stx_blksize field.
    • stx_attributes

      public long stx_attributes()
      Returns:
      the value of the stx_attributes field.
    • stx_nlink

      public int stx_nlink()
      Returns:
      the value of the stx_nlink field.
    • stx_uid

      public int stx_uid()
      Returns:
      the value of the stx_uid field.
    • stx_gid

      public int stx_gid()
      Returns:
      the value of the stx_gid field.
    • stx_mode

      public short stx_mode()
      Returns:
      the value of the stx_mode field.
    • stx_ino

      public long stx_ino()
      Returns:
      the value of the stx_ino field.
    • stx_size

      public long stx_size()
      Returns:
      the value of the stx_size field.
    • stx_blocks

      public long stx_blocks()
      Returns:
      the value of the stx_blocks field.
    • stx_attributes_mask

      public long stx_attributes_mask()
      Returns:
      the value of the stx_attributes_mask field.
    • stx_atime

      public StatxTimestamp stx_atime()
      Returns:
      a StatxTimestamp view of the stx_atime field.
    • stx_btime

      public StatxTimestamp stx_btime()
      Returns:
      a StatxTimestamp view of the stx_btime field.
    • stx_ctime

      public StatxTimestamp stx_ctime()
      Returns:
      a StatxTimestamp view of the stx_ctime field.
    • stx_mtime

      public StatxTimestamp stx_mtime()
      Returns:
      a StatxTimestamp view of the stx_mtime field.
    • stx_rdev_major

      public int stx_rdev_major()
      Returns:
      the value of the stx_rdev_major field.
    • stx_rdev_minor

      public int stx_rdev_minor()
      Returns:
      the value of the stx_rdev_minor field.
    • stx_dev_major

      public int stx_dev_major()
      Returns:
      the value of the stx_dev_major field.
    • stx_dev_minor

      public int stx_dev_minor()
      Returns:
      the value of the stx_dev_minor field.
    • stx_mnt_id

      public long stx_mnt_id()
      Returns:
      the value of the stx_mnt_id field.
    • stx_mask

      public Statx stx_mask(int value)
      Sets the specified value to the stx_mask field.
    • stx_blksize

      public Statx stx_blksize(int value)
      Sets the specified value to the stx_blksize field.
    • stx_attributes

      public Statx stx_attributes(long value)
      Sets the specified value to the stx_attributes field.
    • stx_nlink

      public Statx stx_nlink(int value)
      Sets the specified value to the stx_nlink field.
    • stx_uid

      public Statx stx_uid(int value)
      Sets the specified value to the stx_uid field.
    • stx_gid

      public Statx stx_gid(int value)
      Sets the specified value to the stx_gid field.
    • stx_mode

      public Statx stx_mode(short value)
      Sets the specified value to the stx_mode field.
    • stx_ino

      public Statx stx_ino(long value)
      Sets the specified value to the stx_ino field.
    • stx_size

      public Statx stx_size(long value)
      Sets the specified value to the stx_size field.
    • stx_blocks

      public Statx stx_blocks(long value)
      Sets the specified value to the stx_blocks field.
    • stx_attributes_mask

      public Statx stx_attributes_mask(long value)
      Sets the specified value to the stx_attributes_mask field.
    • stx_atime

      public Statx stx_atime(StatxTimestamp value)
      Copies the specified StatxTimestamp to the stx_atime field.
    • stx_atime

      public Statx stx_atime(Consumer<StatxTimestamp> consumer)
      Passes the stx_atime field to the specified Consumer.
    • stx_btime

      public Statx stx_btime(StatxTimestamp value)
      Copies the specified StatxTimestamp to the stx_btime field.
    • stx_btime

      public Statx stx_btime(Consumer<StatxTimestamp> consumer)
      Passes the stx_btime field to the specified Consumer.
    • stx_ctime

      public Statx stx_ctime(StatxTimestamp value)
      Copies the specified StatxTimestamp to the stx_ctime field.
    • stx_ctime

      public Statx stx_ctime(Consumer<StatxTimestamp> consumer)
      Passes the stx_ctime field to the specified Consumer.
    • stx_mtime

      public Statx stx_mtime(StatxTimestamp value)
      Copies the specified StatxTimestamp to the stx_mtime field.
    • stx_mtime

      public Statx stx_mtime(Consumer<StatxTimestamp> consumer)
      Passes the stx_mtime field to the specified Consumer.
    • stx_rdev_major

      public Statx stx_rdev_major(int value)
      Sets the specified value to the stx_rdev_major field.
    • stx_rdev_minor

      public Statx stx_rdev_minor(int value)
      Sets the specified value to the stx_rdev_minor field.
    • stx_dev_major

      public Statx stx_dev_major(int value)
      Sets the specified value to the stx_dev_major field.
    • stx_dev_minor

      public Statx stx_dev_minor(int value)
      Sets the specified value to the stx_dev_minor field.
    • stx_mnt_id

      public Statx stx_mnt_id(long value)
      Sets the specified value to the stx_mnt_id field.
    • set

      public Statx set(int stx_mask, int stx_blksize, long stx_attributes, int stx_nlink, int stx_uid, int stx_gid, short stx_mode, long stx_ino, long stx_size, long stx_blocks, long stx_attributes_mask, StatxTimestamp stx_atime, StatxTimestamp stx_btime, StatxTimestamp stx_ctime, StatxTimestamp stx_mtime, int stx_rdev_major, int stx_rdev_minor, int stx_dev_major, int stx_dev_minor, long stx_mnt_id)
      Initializes this struct with the specified values.
    • set

      public Statx set(Statx src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static Statx malloc()
      Returns a new Statx instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static Statx calloc()
      Returns a new Statx instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static Statx create()
      Returns a new Statx instance allocated with BufferUtils.
    • create

      public static Statx create(long address)
      Returns a new Statx instance for the specified memory address.
    • createSafe

      public static @Nullable Statx createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static Statx.Buffer malloc(int capacity)
      Returns a new Statx.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static Statx.Buffer calloc(int capacity)
      Returns a new Statx.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static Statx.Buffer create(int capacity)
      Returns a new Statx.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static Statx.Buffer create(long address, int capacity)
      Create a Statx.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable Statx.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static Statx malloc(MemoryStack stack)
      Returns a new Statx instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static Statx calloc(MemoryStack stack)
      Returns a new Statx instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static Statx.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new Statx.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static Statx.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new Statx.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nstx_mask

      public static int nstx_mask(long struct)
      Unsafe version of stx_mask().
    • nstx_blksize

      public static int nstx_blksize(long struct)
      Unsafe version of stx_blksize().
    • nstx_attributes

      public static long nstx_attributes(long struct)
      Unsafe version of stx_attributes().
    • nstx_nlink

      public static int nstx_nlink(long struct)
      Unsafe version of stx_nlink().
    • nstx_uid

      public static int nstx_uid(long struct)
      Unsafe version of stx_uid().
    • nstx_gid

      public static int nstx_gid(long struct)
      Unsafe version of stx_gid().
    • nstx_mode

      public static short nstx_mode(long struct)
      Unsafe version of stx_mode().
    • n__spare0

      public static ShortBuffer n__spare0(long struct)
    • n__spare0

      public static short n__spare0(long struct, int index)
    • nstx_ino

      public static long nstx_ino(long struct)
      Unsafe version of stx_ino().
    • nstx_size

      public static long nstx_size(long struct)
      Unsafe version of stx_size().
    • nstx_blocks

      public static long nstx_blocks(long struct)
      Unsafe version of stx_blocks().
    • nstx_attributes_mask

      public static long nstx_attributes_mask(long struct)
      Unsafe version of stx_attributes_mask().
    • nstx_atime

      public static StatxTimestamp nstx_atime(long struct)
      Unsafe version of stx_atime().
    • nstx_btime

      public static StatxTimestamp nstx_btime(long struct)
      Unsafe version of stx_btime().
    • nstx_ctime

      public static StatxTimestamp nstx_ctime(long struct)
      Unsafe version of stx_ctime().
    • nstx_mtime

      public static StatxTimestamp nstx_mtime(long struct)
      Unsafe version of stx_mtime().
    • nstx_rdev_major

      public static int nstx_rdev_major(long struct)
      Unsafe version of stx_rdev_major().
    • nstx_rdev_minor

      public static int nstx_rdev_minor(long struct)
      Unsafe version of stx_rdev_minor().
    • nstx_dev_major

      public static int nstx_dev_major(long struct)
      Unsafe version of stx_dev_major().
    • nstx_dev_minor

      public static int nstx_dev_minor(long struct)
      Unsafe version of stx_dev_minor().
    • nstx_mnt_id

      public static long nstx_mnt_id(long struct)
      Unsafe version of stx_mnt_id().
    • n__spare2

      public static long n__spare2(long struct)
    • n__spare3

      public static LongBuffer n__spare3(long struct)
    • n__spare3

      public static long n__spare3(long struct, int index)
    • nstx_mask

      public static void nstx_mask(long struct, int value)
      Unsafe version of stx_mask.
    • nstx_blksize

      public static void nstx_blksize(long struct, int value)
      Unsafe version of stx_blksize.
    • nstx_attributes

      public static void nstx_attributes(long struct, long value)
      Unsafe version of stx_attributes.
    • nstx_nlink

      public static void nstx_nlink(long struct, int value)
      Unsafe version of stx_nlink.
    • nstx_uid

      public static void nstx_uid(long struct, int value)
      Unsafe version of stx_uid.
    • nstx_gid

      public static void nstx_gid(long struct, int value)
      Unsafe version of stx_gid.
    • nstx_mode

      public static void nstx_mode(long struct, short value)
      Unsafe version of stx_mode.
    • n__spare0

      public static void n__spare0(long struct, ShortBuffer value)
    • n__spare0

      public static void n__spare0(long struct, int index, short value)
    • nstx_ino

      public static void nstx_ino(long struct, long value)
      Unsafe version of stx_ino.
    • nstx_size

      public static void nstx_size(long struct, long value)
      Unsafe version of stx_size.
    • nstx_blocks

      public static void nstx_blocks(long struct, long value)
      Unsafe version of stx_blocks.
    • nstx_attributes_mask

      public static void nstx_attributes_mask(long struct, long value)
      Unsafe version of stx_attributes_mask.
    • nstx_atime

      public static void nstx_atime(long struct, StatxTimestamp value)
      Unsafe version of stx_atime.
    • nstx_btime

      public static void nstx_btime(long struct, StatxTimestamp value)
      Unsafe version of stx_btime.
    • nstx_ctime

      public static void nstx_ctime(long struct, StatxTimestamp value)
      Unsafe version of stx_ctime.
    • nstx_mtime

      public static void nstx_mtime(long struct, StatxTimestamp value)
      Unsafe version of stx_mtime.
    • nstx_rdev_major

      public static void nstx_rdev_major(long struct, int value)
      Unsafe version of stx_rdev_major.
    • nstx_rdev_minor

      public static void nstx_rdev_minor(long struct, int value)
      Unsafe version of stx_rdev_minor.
    • nstx_dev_major

      public static void nstx_dev_major(long struct, int value)
      Unsafe version of stx_dev_major.
    • nstx_dev_minor

      public static void nstx_dev_minor(long struct, int value)
      Unsafe version of stx_dev_minor.
    • nstx_mnt_id

      public static void nstx_mnt_id(long struct, long value)
      Unsafe version of stx_mnt_id.
    • n__spare2

      public static void n__spare2(long struct, long value)
    • n__spare3

      public static void n__spare3(long struct, LongBuffer value)
    • n__spare3

      public static void n__spare3(long struct, int index, long value)