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.NativeResourceArguments for howopenat2(2)should open the target path.If only
flagsand@mode are non-zero, thenopenat2(2)operates very similarly toopenat(2).However, unlike
openat(2), unknown or invalid bits inflagsresult in-EINVALrather than being silently ignored.modemust be zero unless one ofFCNTL.O_CREAT,FCNTL.O_TMPFILEare set.Layout
struct open_how { __u64 flags; __u64 mode; __u64 resolve; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenHow.BufferAn array ofOpenHowstructs.
-
Constructor Summary
Constructors Constructor Description OpenHow(java.nio.ByteBuffer container)Creates aOpenHowinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OpenHowcalloc()Returns a newOpenHowinstance allocated withmemCalloc.static OpenHow.Buffercalloc(int capacity)Returns a newOpenHow.Bufferinstance allocated withmemCalloc.static OpenHow.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOpenHow.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OpenHowcalloc(org.lwjgl.system.MemoryStack stack)Returns a newOpenHowinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OpenHowcreate()Returns a newOpenHowinstance allocated withBufferUtils.static OpenHow.Buffercreate(int capacity)Returns a newOpenHow.Bufferinstance allocated withBufferUtils.static OpenHowcreate(long address)Returns a newOpenHowinstance for the specified memory address.static OpenHow.Buffercreate(long address, int capacity)Create aOpenHow.Bufferinstance at the specified memory.static OpenHowcreateSafe(long address)static OpenHow.BuffercreateSafe(long address, int capacity)longflags()OpenHowflags(long value)Sets the specified value to theflagsfield.static OpenHowmalloc()Returns a newOpenHowinstance allocated withmemAlloc.static OpenHow.Buffermalloc(int capacity)Returns a newOpenHow.Bufferinstance allocated withmemAlloc.static OpenHow.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOpenHow.Bufferinstance allocated on the specifiedMemoryStack.static OpenHowmalloc(org.lwjgl.system.MemoryStack stack)Returns a newOpenHowinstance allocated on the specifiedMemoryStack.longmode()OpenHowmode(long value)Sets the specified value to themodefield.static longnflags(long struct)Unsafe version offlags().static voidnflags(long struct, long value)Unsafe version offlags.static longnmode(long struct)Unsafe version ofmode().static voidnmode(long struct, long value)Unsafe version ofmode.static longnresolve(long struct)Unsafe version ofresolve().static voidnresolve(long struct, long value)Unsafe version ofresolve.longresolve()OpenHowresolve(long value)Sets the specified value to theresolvefield.OpenHowset(long flags, long mode, long resolve)Initializes this struct with the specified values.OpenHowset(OpenHow src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
OpenHow
public OpenHow(java.nio.ByteBuffer container)
Creates aOpenHowinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
flags
public long flags()
- Returns:
- the value of the
flagsfield.
-
mode
public long mode()
- Returns:
- the value of the
modefield.
-
resolve
public long resolve()
- Returns:
- the value of the
resolvefield.
-
flags
public OpenHow flags(long value)
Sets the specified value to theflagsfield.
-
mode
public OpenHow mode(long value)
Sets the specified value to themodefield.
-
resolve
public OpenHow resolve(long value)
Sets the specified value to theresolvefield.
-
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 newOpenHowinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OpenHow calloc()
Returns a newOpenHowinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OpenHow create()
Returns a newOpenHowinstance allocated withBufferUtils.
-
create
public static OpenHow create(long address)
Returns a newOpenHowinstance for the specified memory address.
-
createSafe
@Nullable public static OpenHow createSafe(long address)
-
malloc
public static OpenHow.Buffer malloc(int capacity)
Returns a newOpenHow.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OpenHow.Buffer calloc(int capacity)
Returns a newOpenHow.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OpenHow.Buffer create(int capacity)
Returns a newOpenHow.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OpenHow.Buffer create(long address, int capacity)
Create aOpenHow.Bufferinstance 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 newOpenHowinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static OpenHow calloc(org.lwjgl.system.MemoryStack stack)
Returns a newOpenHowinstance allocated on the specifiedMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-