Top Fields Constructors Methods
jnr.posix

pack-priv final Class LazyPOSIX

extends Object
implements POSIX
Class Inheritance
All Implemented Interfaces
jnr.posix.POSIX
Imports
jnr.constants.platform.Fcntl, .Sysconf, .Confstr, .Pathconf, .Signal, jnr.ffi.Pointer, jnr.posix.util.ProcessMaker, java.io.FileDescriptor, .IOException, java.nio.ByteBuffer, java.util.Collection

Field Summary

Modifier and TypeField and Description
private final POSIXHandler
private volatile POSIX
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
LazyPOSIX(POSIXHandler handler, boolean useNativePosix)

Method Summary

Modifier and TypeMethod and Description
public int
access(CharSequence path, int amode)

Implements jnr.posix.POSIX.access.

public MsgHdr
public FileStat
public Timeval
public int
public int
chmod(String filename, int mode)

Implements jnr.posix.POSIX.chmod.

public int
chown(String filename, int user, int group)

Implements jnr.posix.POSIX.chown.

public int
close(int fd)

Implements jnr.posix.POSIX.close.

public int
confstr(Confstr name, ByteBuffer buf, int len)

Implements jnr.posix.POSIX.confstr.

public CharSequence
public byte[]
crypt(byte[]
null-terminated key bytes
key
,
byte[]
null-terminated salt bytes
salt
)

Implements jnr.posix.POSIX.crypt.

Call the crypt function with the given key and salt as raw null-terminated byte (C char) strings.
public int
daemon(int nochdir, int noclose)

Implements jnr.posix.POSIX.daemon.

public int
dup(int fd)

Implements jnr.posix.POSIX.dup.

public int
dup2(int oldFd, int newFd)

Implements jnr.posix.POSIX.dup2.

public int
public int
public Pointer
public int
public void
errno(int value)

Implements jnr.posix.POSIX.errno.

public int
exec(String
the path to execute
path
,
String...
the arguments to pass, with arg0 equal to the desired process name
args
)

Implements jnr.posix.POSIX.exec.

Shell expanding and escaping version of exec which handles all the preparation of a command line or command list.
public int
exec(String
the path to execute
path
,
String[]
the arguments to pass, with arg0 equal to the desired process name
args
,
String[]
a set of KEY=VALUE environment strings to set for the new execution
envp
)

Implements jnr.posix.POSIX.exec.

Shell expanding and escaping version of exec which handles all the preparation of a command line or command list.
public int
execv(String path, String[] argv)

Implements jnr.posix.POSIX.execv.

public int
execve(String path, String[] argv, String[] envp)

Implements jnr.posix.POSIX.execve.

public int
fchmod(int fd, int mode)

Implements jnr.posix.POSIX.fchmod.

public int
fchown(int fd, int user, int group)

Implements jnr.posix.POSIX.fchown.

public int
fcntl(int fd, Fcntl fcntlConst)

Implements jnr.posix.POSIX.fcntl.

public int
fcntl(int fd, Fcntl fcntlConst, int arg)

Implements jnr.posix.POSIX.fcntl.

public int
fcntl(int
the file descriptor on which to act
fd
,
Fcntl
the Fcntl enum value for the flag to set
fcntlConst
,
int...
arguments for the flag or null if none
arg
)

Implements jnr.posix.POSIX.fcntl.

Deprecated
fcntl(2)
public int
fcntlInt(int fd, Fcntl fcntlConst, int arg)

Implements jnr.posix.POSIX.fcntlInt.

public int
public int
flock(int fd, int mode)

Implements jnr.posix.POSIX.flock.

public int
public int
fpathconf(int fd, Pathconf name)

Implements jnr.posix.POSIX.fpathconf.

public FileStat
fstat(int fd)

Implements jnr.posix.POSIX.fstat.

public int
fstat(int fd, FileStat stat)

Implements jnr.posix.POSIX.fstat.

public FileStat
public int
fstat(FileDescriptor descriptor, FileStat stat)

Implements jnr.posix.POSIX.fstat.

public int
fsync(int fd)

Implements jnr.posix.POSIX.fsync.

public int
ftruncate(int fd, long offset)

Implements jnr.posix.POSIX.ftruncate.

public int
futimens(int fd, long[] atimespec, long[] mtimespec)

Implements jnr.posix.POSIX.futimens.

public int
futimens(int fd, Pointer times)

Implements jnr.posix.POSIX.futimens.

public int
futimes(int fd, long[] atimeval, long[] mtimeval)

Implements jnr.posix.POSIX.futimes.

public String
public int
public int
public String
getenv(String envName)

Implements jnr.posix.POSIX.getenv.

public int
public int
public Group
public Group
getgrgid(int which)

Implements jnr.posix.POSIX.getgrgid.

public Group
public long[]
public int
getgroups(int size, int[] groups)

Implements jnr.posix.POSIX.getgroups.

public String
public String
public int
public int
getpgid(int pid)

Implements jnr.posix.POSIX.getpgid.

public int
public int
public int
public int
getpriority(int which, int who)

Implements jnr.posix.POSIX.getpriority.

public Passwd
public Passwd
public Passwd
getpwuid(int which)

Implements jnr.posix.POSIX.getpwuid.

public int
getrlimit(int resource, RLimit rlim)

Implements jnr.posix.POSIX.getrlimit.

public int
getrlimit(int resource, Pointer rlim)

Implements jnr.posix.POSIX.getrlimit.

public RLimit
getrlimit(int resource)

Implements jnr.posix.POSIX.getrlimit.

public int
public int
public boolean
public int
isatty(int descriptor)

Implements jnr.posix.POSIX.isatty.

public boolean
public int
kill(int pid, int signal)

Implements jnr.posix.POSIX.kill.

public int
kill(long pid, int signal)

Implements jnr.posix.POSIX.kill.

public int
lchmod(String filename, int mode)

Implements jnr.posix.POSIX.lchmod.

public int
lchown(String filename, int user, int group)

Implements jnr.posix.POSIX.lchown.

public LibC
libc()

Implements jnr.posix.POSIX.libc.

Returns null if isNative returns false.
private final synchronized POSIX
public int
lseek(int fd, long offset, int whence)

Implements jnr.posix.POSIX.lseek.

public long
lseekLong(int fd, long offset, int whence)

Implements jnr.posix.POSIX.lseekLong.

public FileStat
public int
lstat(String path, FileStat stat)

Implements jnr.posix.POSIX.lstat.

public int
lutimes(String path, long[] atimeval, long[] mtimeval)

Implements jnr.posix.POSIX.lutimes.

public int
mkdir(String path, int mode)

Implements jnr.posix.POSIX.mkdir.

public int
mkfifo(String path, int mode)

Implements jnr.posix.POSIX.mkfifo.

public ProcessMaker
public ProcessMaker
public String
public int
open(CharSequence path, int flags, int perm)

Implements jnr.posix.POSIX.open.

public int
pipe(int[] fds)

Implements jnr.posix.POSIX.pipe.

private final POSIX
public long
posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp)

Implements jnr.posix.POSIX.posix_spawnp.

public long
posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp)

Implements jnr.posix.POSIX.posix_spawnp.

public long
pread(int fd, byte[] buf, long n, long offset)

Implements jnr.posix.POSIX.pread.

public long
pread(int fd, ByteBuffer buf, long n, long offset)

Implements jnr.posix.POSIX.pread.

public int
pread(int fd, byte[] buf, int n, int offset)

Implements jnr.posix.POSIX.pread.

public int
pread(int fd, ByteBuffer buf, int n, int offset)

Implements jnr.posix.POSIX.pread.

public long
pwrite(int fd, byte[] buf, long n, long offset)

Implements jnr.posix.POSIX.pwrite.

public long
pwrite(int fd, ByteBuffer buf, long n, long offset)

Implements jnr.posix.POSIX.pwrite.

public int
pwrite(int fd, byte[] buf, int n, int offset)

Implements jnr.posix.POSIX.pwrite.

public int
pwrite(int fd, ByteBuffer buf, int n, int offset)

Implements jnr.posix.POSIX.pwrite.

public int
raise(int sig)

Implements jnr.posix.POSIX.raise.

public long
read(int fd, byte[] buf, long n)

Implements jnr.posix.POSIX.read.

public long
read(int fd, ByteBuffer buf, long n)

Implements jnr.posix.POSIX.read.

public int
read(int fd, byte[] buf, int n)

Implements jnr.posix.POSIX.read.

public int
read(int fd, ByteBuffer buf, int n)

Implements jnr.posix.POSIX.read.

public int
recvmsg(int socket, MsgHdr message, int flags)

Implements jnr.posix.POSIX.recvmsg.

public int
public int
public int
sendmsg(int socket, MsgHdr message, int flags)

Implements jnr.posix.POSIX.sendmsg.

public int
setegid(int egid)

Implements jnr.posix.POSIX.setegid.

public int
setenv(String envName, String envValue, int overwrite)

Implements jnr.posix.POSIX.setenv.

public int
seteuid(int euid)

Implements jnr.posix.POSIX.seteuid.

public int
setgid(int gid)

Implements jnr.posix.POSIX.setgid.

public int
public String
setlocale(int category, String locale)

Implements jnr.posix.POSIX.setlocale.

public int
setpgid(int pid, int pgid)

Implements jnr.posix.POSIX.setpgid.

public int
setpgrp(int pid, int pgrp)

Implements jnr.posix.POSIX.setpgrp.

public int
setpriority(int which, int who, int prio)

Implements jnr.posix.POSIX.setpriority.

public int
public int
setrlimit(int resource, RLimit rlim)

Implements jnr.posix.POSIX.setrlimit.

public int
setrlimit(int resource, Pointer rlim)

Implements jnr.posix.POSIX.setrlimit.

public int
setrlimit(int resource, long rlimCur, long rlimMax)

Implements jnr.posix.POSIX.setrlimit.

public int
public int
setuid(int uid)

Implements jnr.posix.POSIX.setuid.

public SignalHandler
public int
socketpair(int domain, int type, int protocol, int[] fds)

Implements jnr.posix.POSIX.socketpair.

public FileStat
stat(String path)

Implements jnr.posix.POSIX.stat.

public int
stat(String path, FileStat stat)

Implements jnr.posix.POSIX.stat.

public String
strerror(int code)

Implements jnr.posix.POSIX.strerror.

public long
public Times
public int
truncate(CharSequence path, long length)

Implements jnr.posix.POSIX.truncate.

public int
umask(int mask)

Implements jnr.posix.POSIX.umask.

public int
public int
utimensat(int dirfd, String path, long[] atimespec, long[] mtimespec, int flag)

Implements jnr.posix.POSIX.utimensat.

public int
utimensat(int dirfd, String path, Pointer times, int flag)

Implements jnr.posix.POSIX.utimensat.

public int
utimes(String path, long[] atimeval, long[] mtimeval)

Implements jnr.posix.POSIX.utimes.

public int
utimes(String path, Pointer times)

Implements jnr.posix.POSIX.utimes.

public int
wait(int[] status)

Implements jnr.posix.POSIX.wait.

public int
waitpid(int pid, int[] status, int flags)

Implements jnr.posix.POSIX.waitpid.

public int
waitpid(long pid, int[] status, int flags)

Implements jnr.posix.POSIX.waitpid.

public long
write(int fd, byte[] buf, long n)

Implements jnr.posix.POSIX.write.

public long
write(int fd, ByteBuffer buf, long n)

Implements jnr.posix.POSIX.write.

public int
write(int fd, byte[] buf, int n)

Implements jnr.posix.POSIX.write.

public int
write(int fd, ByteBuffer buf, int n)

Implements jnr.posix.POSIX.write.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait