Class OpenHow

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class OpenHow
    extends org.lwjgl.system.Struct
    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  OpenHow.Buffer
      An array of OpenHow structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

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

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int FLAGS
      MODE
      RESOLVE
      The struct member offsets.
      static int SIZEOF
      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​(java.nio.ByteBuffer container)
      Creates a OpenHow instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static OpenHow calloc()
      Returns a new OpenHow instance allocated with memCalloc.
      static OpenHow.Buffer calloc​(int capacity)
      Returns a new OpenHow.Buffer instance allocated with memCalloc.
      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.
      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 create()
      Returns a new OpenHow instance allocated with BufferUtils.
      static OpenHow.Buffer 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.
      static OpenHow.Buffer 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.
      static OpenHow.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      long flags()  
      OpenHow flags​(long value)
      Sets the specified value to the flags field.
      static OpenHow malloc()
      Returns a new OpenHow instance allocated with memAlloc.
      static OpenHow.Buffer malloc​(int capacity)
      Returns a new OpenHow.Buffer instance allocated with memAlloc.
      static OpenHow.Buffer 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()  
      OpenHow 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()  
      OpenHow resolve​(long value)
      Sets the specified value to the resolve field.
      OpenHow set​(long flags, long mode, long resolve)
      Initializes this struct with the specified values.
      OpenHow set​(OpenHow src)
      Copies the specified struct data to this struct.
      int sizeof()  
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull, validate
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FLAGS, MODE, RESOLVE

        The struct member offsets.
    • Constructor Detail

      • OpenHow

        public OpenHow​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.