Package org.lwjgl.system.linux
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/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
Modifier and TypeFieldDescriptionstatic 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
ConstructorDescriptionOpenHow
(ByteBuffer container) Creates aOpenHow
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenHow
calloc()
Returns a newOpenHow
instance allocated withmemCalloc
.static OpenHow.Buffer
calloc
(int capacity) Returns a newOpenHow.Buffer
instance allocated withmemCalloc
.static OpenHow.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOpenHow.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OpenHow
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newOpenHow
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OpenHow
create()
Returns a newOpenHow
instance allocated withBufferUtils
.static OpenHow.Buffer
create
(int capacity) Returns a newOpenHow.Buffer
instance allocated withBufferUtils
.static OpenHow
create
(long address) Returns a newOpenHow
instance for the specified memory address.static OpenHow.Buffer
create
(long address, int capacity) Create aOpenHow.Buffer
instance at the specified memory.static OpenHow
createSafe
(long address) static OpenHow.Buffer
createSafe
(long address, int capacity) long
flags()
flags
(long value) Sets the specified value to theflags
field.static OpenHow
malloc()
Returns a newOpenHow
instance allocated withmemAlloc
.static OpenHow.Buffer
malloc
(int capacity) Returns a newOpenHow.Buffer
instance allocated withmemAlloc
.static OpenHow.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newOpenHow.Buffer
instance allocated on the specifiedMemoryStack
.static OpenHow
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newOpenHow
instance allocated on the specifiedMemoryStack
.long
mode()
mode
(long value) Sets the specified value to themode
field.static long
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, long value) Unsafe version offlags
.static long
nmode
(long struct) Unsafe version ofmode()
.static void
nmode
(long struct, long value) Unsafe version ofmode
.static long
nresolve
(long struct) Unsafe version ofresolve()
.static void
nresolve
(long struct, long value) Unsafe version ofresolve
.long
resolve()
resolve
(long value) Sets the specified value to theresolve
field.set
(long flags, long mode, long resolve) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
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 interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
FLAGS
public static final int FLAGSThe struct member offsets. -
MODE
public static final int MODEThe struct member offsets. -
RESOLVE
public static final int RESOLVEThe struct member offsets.
-
-
Constructor Details
-
OpenHow
Creates aOpenHow
instance at the current position of the specifiedByteBuffer
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 classorg.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
Sets the specified value to theflags
field. -
mode
Sets the specified value to themode
field. -
resolve
Sets the specified value to theresolve
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newOpenHow
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOpenHow
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOpenHow
instance allocated withBufferUtils
. -
create
Returns a newOpenHow
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOpenHow.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOpenHow.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOpenHow.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOpenHow.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newOpenHow
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOpenHow
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOpenHow.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOpenHow.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nflags
public static long nflags(long struct) Unsafe version offlags()
. -
nmode
public static long nmode(long struct) Unsafe version ofmode()
. -
nresolve
public static long nresolve(long struct) Unsafe version ofresolve()
. -
nflags
public static void nflags(long struct, long value) Unsafe version offlags
. -
nmode
public static void nmode(long struct, long value) Unsafe version ofmode
. -
nresolve
public static void nresolve(long struct, long value) Unsafe version ofresolve
.
-