public abstract class BaseNativePOSIX extends NativePOSIX implements POSIX
Modifier and Type | Class and Description |
---|---|
static class |
BaseNativePOSIX.PointerConverter |
Modifier and Type | Field and Description |
---|---|
static jnr.ffi.mapper.ToNativeConverter<jnr.constants.Constant,Integer> |
ConstantConverter |
static jnr.ffi.mapper.ToNativeConverter<FileStat,jnr.ffi.Pointer> |
FileStatConverter |
static BaseNativePOSIX.PointerConverter |
GROUP |
protected POSIXHandler |
handler |
protected JavaLibCHelper |
helper |
static jnr.ffi.mapper.ToNativeConverter<MsgHdr,jnr.ffi.Pointer> |
MsgHdrConverter |
protected Map<jnr.constants.platform.Signal,SignalHandler> |
signalHandlers |
static jnr.ffi.mapper.ToNativeConverter<NativeTimes,jnr.ffi.Pointer> |
TimesConverter |
Modifier | Constructor and Description |
---|---|
protected |
BaseNativePOSIX(LibCProvider libcProvider,
POSIXHandler handler) |
Modifier and Type | Method and Description |
---|---|
int |
access(CharSequence path,
int amode) |
abstract FileStat |
allocateStat() |
Timeval |
allocateTimeval() |
int |
chdir(String path) |
int |
chmod(String filename,
int mode) |
int |
chown(String filename,
int user,
int group) |
int |
close(int fd) |
Crypt |
crypt() |
byte[] |
crypt(byte[] key,
byte[] salt)
Call the crypt function with the given key and salt as raw null-terminated byte (C char) strings.
|
CharSequence |
crypt(CharSequence key,
CharSequence salt) |
int |
daemon(int nochdir,
int noclose) |
int |
dup(int fd) |
int |
dup2(int oldFd,
int newFd) |
int |
endgrent() |
int |
endpwent() |
jnr.ffi.Pointer |
environ() |
int |
errno() |
void |
errno(int value) |
int |
exec(String path,
String... args)
Shell expanding and escaping version of exec which handles all the
preparation of a command line or command list.
|
int |
exec(String path,
String[] args,
String[] envp)
Shell expanding and escaping version of exec which handles all the
preparation of a command line or command list.
|
int |
execv(String path,
String[] args) |
int |
execve(String path,
String[] args,
String[] env) |
int |
fchmod(int fd,
int mode) |
int |
fchown(int fd,
int user,
int group) |
int |
fcntl(int fd,
jnr.constants.platform.Fcntl fcntl) |
int |
fcntl(int fd,
jnr.constants.platform.Fcntl fcntl,
int... arg)
fcntl(2)
|
int |
fcntlInt(int fd,
jnr.constants.platform.Fcntl fcntl,
int arg) |
int |
fdatasync(int fd) |
int |
flock(int fd,
int mode) |
int |
fork() |
FileStat |
fstat(FileDescriptor fileDescriptor) |
int |
fstat(FileDescriptor fileDescriptor,
FileStat stat) |
FileStat |
fstat(int fd) |
int |
fstat(int fd,
FileStat stat) |
int |
fsync(int fd) |
int |
ftruncate(int fd,
long offset) |
int |
futimens(int fd,
long[] atimespec,
long[] mtimespec) |
int |
futimens(int fd,
jnr.ffi.Pointer times) |
int |
futimes(int fd,
long[] atimeval,
long[] mtimeval) |
String |
getcwd() |
int |
getdtablesize() |
int |
getegid() |
String |
getenv(String envName) |
int |
geteuid() |
int |
getfd(FileDescriptor descriptor) |
int |
getgid() |
Group |
getgrent() |
Group |
getgrgid(int which) |
Group |
getgrnam(String which) |
long[] |
getgroups() |
int |
getgroups(int size,
int[] groups) |
String |
getlogin() |
int |
getpgid() |
int |
getpgid(int pid) |
int |
getpgrp() |
int |
getpid() |
int |
getppid() |
int |
getpriority(int which,
int who) |
Passwd |
getpwent() |
Passwd |
getpwnam(String which) |
Passwd |
getpwuid(int which) |
RLimit |
getrlimit(int resource) |
int |
getrlimit(int resource,
jnr.ffi.Pointer rlim) |
int |
getrlimit(int resource,
RLimit rlim) |
int |
gettimeofday(Timeval tv) |
int |
getuid() |
boolean |
isatty(FileDescriptor fd) |
int |
isatty(int fd) |
boolean |
isNative() |
int |
kill(int pid,
int signal) |
int |
kill(long pid,
int signal) |
int |
lchmod(String filename,
int mode) |
int |
lchown(String filename,
int user,
int group) |
LibC |
libc()
Returns null if isNative returns false.
|
int |
link(String oldpath,
String newpath) |
int |
lseek(int fd,
long offset,
int whence) |
long |
lseekLong(int fd,
long offset,
int whence) |
FileStat |
lstat(String path) |
int |
lstat(String path,
FileStat stat) |
int |
lutimes(String path,
long[] atimeval,
long[] mtimeval) |
int |
mkdir(String path,
int mode) |
int |
mkfifo(String filename,
int mode) |
ProcessMaker |
newProcessMaker() |
ProcessMaker |
newProcessMaker(String... command) |
String |
nl_langinfo(int item) |
int |
open(CharSequence path,
int flags,
int perm) |
int |
pipe(int[] fds) |
long |
posix_spawnp(String path,
Collection<? extends SpawnFileAction> fileActions,
CharSequence[] argv,
CharSequence[] envp) |
long |
posix_spawnp(String path,
Collection<? extends SpawnFileAction> fileActions,
Collection<? extends CharSequence> argv,
Collection<? extends CharSequence> envp) |
long |
posix_spawnp(String path,
Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
CharSequence[] argv,
CharSequence[] envp) |
long |
posix_spawnp(String path,
Collection<? extends SpawnFileAction> fileActions,
Collection<? extends SpawnAttribute> spawnAttributes,
Collection<? extends CharSequence> argv,
Collection<? extends CharSequence> envp) |
int |
pread(int fd,
byte[] buf,
int n,
int offset) |
long |
pread(int fd,
byte[] buf,
long n,
long offset) |
int |
pread(int fd,
ByteBuffer buf,
int n,
int offset) |
long |
pread(int fd,
ByteBuffer buf,
long n,
long offset) |
int |
pwrite(int fd,
byte[] buf,
int n,
int offset) |
long |
pwrite(int fd,
byte[] buf,
long n,
long offset) |
int |
pwrite(int fd,
ByteBuffer buf,
int n,
int offset) |
long |
pwrite(int fd,
ByteBuffer buf,
long n,
long offset) |
int |
raise(int sig) |
int |
read(int fd,
byte[] buf,
int n) |
long |
read(int fd,
byte[] buf,
long n) |
int |
read(int fd,
ByteBuffer buf,
int n) |
long |
read(int fd,
ByteBuffer buf,
long n) |
int |
readlink(CharSequence path,
byte[] buf,
int bufsize) |
int |
readlink(CharSequence path,
ByteBuffer buf,
int bufsize) |
int |
readlink(CharSequence path,
jnr.ffi.Pointer bufPtr,
int bufsize) |
String |
readlink(String oldpath) |
int |
recvmsg(int socket,
MsgHdr message,
int flags) |
int |
rename(CharSequence oldName,
CharSequence newName) |
int |
rmdir(String path) |
int |
sendmsg(int socket,
MsgHdr message,
int flags) |
int |
setegid(int egid) |
int |
setenv(String envName,
String envValue,
int overwrite) |
int |
seteuid(int euid) |
int |
setgid(int gid) |
int |
setgrent() |
String |
setlocale(int category,
String locale) |
int |
setpgid(int pid,
int pgid) |
int |
setpgrp(int pid,
int pgrp) |
int |
setpriority(int which,
int who,
int prio) |
int |
setpwent() |
int |
setrlimit(int resource,
long rlimCur,
long rlimMax) |
int |
setrlimit(int resource,
jnr.ffi.Pointer rlim) |
int |
setrlimit(int resource,
RLimit rlim) |
int |
setsid() |
int |
setuid(int uid) |
SignalHandler |
signal(jnr.constants.platform.Signal sig,
SignalHandler handler) |
int |
socketpair(int domain,
int type,
int protocol,
int[] fds) |
FileStat |
stat(String path) |
int |
stat(String path,
FileStat stat) |
String |
strerror(int code) |
int |
symlink(String oldpath,
String newpath) |
long |
sysconf(jnr.constants.platform.Sysconf name) |
Times |
times() |
int |
truncate(CharSequence path,
long length) |
int |
umask(int mask) |
protected int |
unimplementedInt() |
protected <T> T |
unimplementedNull() |
int |
unlink(CharSequence path) |
int |
unsetenv(String envName) |
int |
utimensat(int dirfd,
String path,
long[] atimespec,
long[] mtimespec,
int flag) |
int |
utimensat(int dirfd,
String path,
jnr.ffi.Pointer times,
int flag) |
int |
utimes(String path,
long[] atimeval,
long[] mtimeval) |
int |
utimes(String path,
jnr.ffi.Pointer times) |
int |
wait(int[] status) |
int |
waitpid(int pid,
int[] status,
int flags) |
int |
waitpid(long pid,
int[] status,
int flags) |
int |
write(int fd,
byte[] buf,
int n) |
long |
write(int fd,
byte[] buf,
long n) |
int |
write(int fd,
ByteBuffer buf,
int n) |
long |
write(int fd,
ByteBuffer buf,
long n) |
allocatePosixSpawnattr, allocatePosixSpawnFileActions, socketMacros
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allocateMsgHdr
protected final POSIXHandler handler
protected final JavaLibCHelper helper
protected final Map<jnr.constants.platform.Signal,SignalHandler> signalHandlers
public static final BaseNativePOSIX.PointerConverter GROUP
public static final jnr.ffi.mapper.ToNativeConverter<FileStat,jnr.ffi.Pointer> FileStatConverter
public static final jnr.ffi.mapper.ToNativeConverter<NativeTimes,jnr.ffi.Pointer> TimesConverter
public static final jnr.ffi.mapper.ToNativeConverter<jnr.constants.Constant,Integer> ConstantConverter
public static final jnr.ffi.mapper.ToNativeConverter<MsgHdr,jnr.ffi.Pointer> MsgHdrConverter
protected BaseNativePOSIX(LibCProvider libcProvider, POSIXHandler handler)
public ProcessMaker newProcessMaker(String... command)
newProcessMaker
in interface POSIX
public ProcessMaker newProcessMaker()
newProcessMaker
in interface POSIX
public final LibC libc()
POSIX
public final Crypt crypt()
protected <T> T unimplementedNull()
protected int unimplementedInt()
public CharSequence crypt(CharSequence key, CharSequence salt)
public byte[] crypt(byte[] key, byte[] salt)
POSIX
public int exec(String path, String... args)
POSIX
public int exec(String path, String[] args, String[] envp)
POSIX
public FileStat fstat(FileDescriptor fileDescriptor)
public int fstat(FileDescriptor fileDescriptor, FileStat stat)
public int getdtablesize()
getdtablesize
in interface POSIX
public int getrlimit(int resource, RLimit rlim)
public int getrlimit(int resource, jnr.ffi.Pointer rlim)
public int setrlimit(int resource, RLimit rlim)
public int setrlimit(int resource, jnr.ffi.Pointer rlim)
public int setrlimit(int resource, long rlimCur, long rlimMax)
public int getfd(FileDescriptor descriptor)
public SignalHandler signal(jnr.constants.platform.Signal sig, SignalHandler handler)
public int lchown(String filename, int user, int group)
public String readlink(String oldpath) throws IOException
readlink
in interface POSIX
IOException
public int readlink(CharSequence path, byte[] buf, int bufsize)
public int readlink(CharSequence path, ByteBuffer buf, int bufsize)
public int readlink(CharSequence path, jnr.ffi.Pointer bufPtr, int bufsize)
public int utimes(String path, long[] atimeval, long[] mtimeval)
public int utimes(String path, jnr.ffi.Pointer times)
public int futimes(int fd, long[] atimeval, long[] mtimeval)
public int lutimes(String path, long[] atimeval, long[] mtimeval)
public int utimensat(int dirfd, String path, long[] atimespec, long[] mtimespec, int flag)
public int utimensat(int dirfd, String path, jnr.ffi.Pointer times, int flag)
public int futimens(int fd, long[] atimespec, long[] mtimespec)
public int futimens(int fd, jnr.ffi.Pointer times)
public int waitpid(int pid, int[] status, int flags)
public int waitpid(long pid, int[] status, int flags)
public int getpriority(int which, int who)
getpriority
in interface POSIX
public int setpriority(int which, int who, int prio)
setpriority
in interface POSIX
public boolean isatty(FileDescriptor fd)
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, CharSequence[] argv, CharSequence[] envp)
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp)
posix_spawnp
in interface POSIX
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp)
posix_spawnp
in interface POSIX
public long posix_spawnp(String path, Collection<? extends SpawnFileAction> fileActions, Collection<? extends SpawnAttribute> spawnAttributes, CharSequence[] argv, CharSequence[] envp)
public int fcntlInt(int fd, jnr.constants.platform.Fcntl fcntl, int arg)
public int fcntl(int fd, jnr.constants.platform.Fcntl fcntl)
public int fcntl(int fd, jnr.constants.platform.Fcntl fcntl, int... arg)
POSIX
fcntl
in interface POSIX
fd
- the file descriptor on which to actfcntl
- the Fcntl
enum value for the flag to setarg
- arguments for the flag or null if nonePOSIX.fcntlInt(int, jnr.constants.platform.Fcntl, int)
public int access(CharSequence path, int amode)
public abstract FileStat allocateStat()
allocateStat
in interface POSIX
public long sysconf(jnr.constants.platform.Sysconf name)
public int unlink(CharSequence path)
public int open(CharSequence path, int flags, int perm)
public long read(int fd, ByteBuffer buf, long n)
public long write(int fd, ByteBuffer buf, long n)
public long pread(int fd, byte[] buf, long n, long offset)
public long pwrite(int fd, byte[] buf, long n, long offset)
public long pread(int fd, ByteBuffer buf, long n, long offset)
public long pwrite(int fd, ByteBuffer buf, long n, long offset)
public int read(int fd, ByteBuffer buf, int n)
public int write(int fd, ByteBuffer buf, int n)
public int pread(int fd, byte[] buf, int n, int offset)
public int pwrite(int fd, byte[] buf, int n, int offset)
public int pread(int fd, ByteBuffer buf, int n, int offset)
public int pwrite(int fd, ByteBuffer buf, int n, int offset)
public long lseekLong(int fd, long offset, int whence)
public int socketpair(int domain, int type, int protocol, int[] fds)
socketpair
in interface POSIX
public int sendmsg(int socket, MsgHdr message, int flags)
public int recvmsg(int socket, MsgHdr message, int flags)
public int truncate(CharSequence path, long length)
public int rename(CharSequence oldName, CharSequence newName)
public String nl_langinfo(int item)
nl_langinfo
in interface POSIX
public Timeval allocateTimeval()
allocateTimeval
in interface POSIX
public int gettimeofday(Timeval tv)
gettimeofday
in interface POSIX
Copyright © 2019. All rights reserved.