Package org.lwjgl.system.linux
Class OpenHow
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.linux.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 howopenat2(2)
should open the target path.If only
flags
and@
mode are non-zero, thenopenat2(2)
operates very similarly toopenat(2)
.However, unlike
openat(2)
, unknown or invalid bits inflags
result in-EINVAL
rather than being silently ignored.mode
must be zero unless one ofFCNTL.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 ofOpenHow
structs.
-
Constructor Summary
Constructors Constructor Description OpenHow(java.nio.ByteBuffer container)
Creates aOpenHow
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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()
OpenHow
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()
OpenHow
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()
OpenHow
resolve(long value)
Sets the specified value to theresolve
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()
-
-
-
Constructor Detail
-
OpenHow
public OpenHow(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.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 theflags
field.
-
mode
public OpenHow mode(long value)
Sets the specified value to themode
field.
-
resolve
public OpenHow resolve(long value)
Sets the specified value to theresolve
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 newOpenHow
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static OpenHow calloc()
Returns a newOpenHow
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static OpenHow create()
Returns a newOpenHow
instance allocated withBufferUtils
.
-
create
public static OpenHow create(long address)
Returns a newOpenHow
instance for the specified memory address.
-
createSafe
@Nullable public static OpenHow createSafe(long address)
-
malloc
public static OpenHow.Buffer malloc(int capacity)
Returns a newOpenHow.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static OpenHow.Buffer calloc(int capacity)
Returns a newOpenHow.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static OpenHow.Buffer create(int capacity)
Returns a newOpenHow.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static OpenHow.Buffer create(long address, int capacity)
Create aOpenHow.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static OpenHow.Buffer createSafe(long address, int capacity)
-
malloc
public static OpenHow malloc(org.lwjgl.system.MemoryStack stack)
Returns a newOpenHow
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static OpenHow calloc(org.lwjgl.system.MemoryStack stack)
Returns a newOpenHow
instance allocated on the specifiedMemoryStack
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 newOpenHow.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public 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.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
.
-
-