Class OpenHow

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<OpenHow>
org.lwjgl.system.linux.OpenHow
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class OpenHow extends org.lwjgl.system.Struct<OpenHow> implements org.lwjgl.system.NativeResource
Arguments for how openat2(2) should open the target path.

If only flags and @mode are non-zero, then openat2(2) operates very similarly to openat(2).

However, unlike openat(2), unknown or invalid bits in flags result in -EINVAL rather than being silently ignored. mode must be zero unless one of FCNTL.O_CREAT, FCNTL.O_TMPFILE are set.

Layout


 struct open_how {
     __u64 flags;
     __u64 mode;
     __u64 resolve;
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of OpenHow structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpenHow(ByteBuffer container)
    Creates a OpenHow instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static OpenHow
    Returns a new OpenHow instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new OpenHow.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new OpenHow.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static OpenHow
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new OpenHow instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static OpenHow
    Returns a new OpenHow instance allocated with BufferUtils.
    create(int capacity)
    Returns a new OpenHow.Buffer instance allocated with BufferUtils.
    static OpenHow
    create(long address)
    Returns a new OpenHow instance for the specified memory address.
    create(long address, int capacity)
    Create a OpenHow.Buffer instance at the specified memory.
    static OpenHow
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    long
     
    flags(long value)
    Sets the specified value to the flags field.
    static OpenHow
    Returns a new OpenHow instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new OpenHow.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new OpenHow.Buffer instance allocated on the specified MemoryStack.
    static OpenHow
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new OpenHow instance allocated on the specified MemoryStack.
    long
     
    mode(long value)
    Sets the specified value to the mode field.
    static long
    nflags(long struct)
    Unsafe version of flags().
    static void
    nflags(long struct, long value)
    Unsafe version of flags.
    static long
    nmode(long struct)
    Unsafe version of mode().
    static void
    nmode(long struct, long value)
    Unsafe version of mode.
    static long
    nresolve(long struct)
    Unsafe version of resolve().
    static void
    nresolve(long struct, long value)
    Unsafe version of resolve.
    long
     
    resolve(long value)
    Sets the specified value to the resolve field.
    set(long flags, long mode, long resolve)
    Initializes this struct with the specified values.
    set(OpenHow src)
    Copies the specified struct data to this struct.
    int
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

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

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

      public static final int FLAGS
      The struct member offsets.
    • MODE

      public static final int MODE
      The struct member offsets.
    • RESOLVE

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

    • OpenHow

      public OpenHow(ByteBuffer container)
      Creates a OpenHow 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<OpenHow>
    • flags

      public long flags()
      Returns:
      the value of the flags field.
    • mode

      public long mode()
      Returns:
      the value of the mode field.
    • resolve

      public long resolve()
      Returns:
      the value of the resolve field.
    • flags

      public OpenHow flags(long value)
      Sets the specified value to the flags field.
    • mode

      public OpenHow mode(long value)
      Sets the specified value to the mode field.
    • resolve

      public OpenHow resolve(long value)
      Sets the specified value to the resolve field.
    • set

      public OpenHow set(long flags, long mode, long resolve)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static OpenHow.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OpenHow.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
    • nflags

      public static long nflags(long struct)
      Unsafe version of flags().
    • nmode

      public static long nmode(long struct)
      Unsafe version of mode().
    • nresolve

      public static long nresolve(long struct)
      Unsafe version of resolve().
    • nflags

      public static void nflags(long struct, long value)
      Unsafe version of flags.
    • nmode

      public static void nmode(long struct, long value)
      Unsafe version of mode.
    • nresolve

      public static void nresolve(long struct, long value)
      Unsafe version of resolve.