jnr.posix
Interface POSIX


public interface POSIX


Method Summary
 MsgHdr allocateMsgHdr()
           
 FileStat allocateStat()
           
 int chdir(String path)
           
 int chmod(String filename, int mode)
           
 int chown(String filename, int user, int group)
           
 int close(int fd)
           
 CharSequence crypt(CharSequence key, CharSequence salt)
           
 int dup(int fd)
           
 int dup2(int oldFd, int newFd)
           
 int endgrent()
           
 int endpwent()
           
 int errno()
           
 void errno(int value)
           
 int exec(String path, String... argv)
          Shell expanding and escaping version of exec which handles all the preparation of a command line or command list.
 int exec(String path, String[] argv, 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[] argv)
           
 int execve(String path, String[] argv, String[] envp)
           
 int fchmod(int fd, int mode)
           
 int fchown(int fd, int user, int group)
           
 int fcntl(int fd, jnr.constants.platform.Fcntl fcntlConst)
           
 int fcntl(int fd, jnr.constants.platform.Fcntl fcntlConst, int... arg)
          Deprecated. This version does not pass args because jnr-ffi does not support variadic invocation.
 int fcntlInt(int fd, jnr.constants.platform.Fcntl fcntlConst, int arg)
           
 int fdatasync(int fd)
           
 int flock(int fd, int operation)
           
 int fork()
           
 FileStat fstat(FileDescriptor descriptor)
           
 int fstat(FileDescriptor descriptor, FileStat stat)
           
 FileStat fstat(int descriptor)
           
 int fstat(int fd, FileStat stat)
           
 int fsync(int fd)
           
 int ftruncate(int fd, long offset)
           
 int futimes(int fd, long[] atimeval, long[] mtimeval)
           
 String getcwd()
           
 int getdtablesize()
           
 int getegid()
           
 String getenv(String envName)
           
 int geteuid()
           
 int getgid()
           
 Group getgrent()
           
 Group getgrgid(int which)
           
 Group getgrnam(String which)
           
 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)
           
 int getuid()
           
 boolean isatty(FileDescriptor descriptor)
           
 boolean isNative()
           
 int kill(int 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)
           
 FileStat lstat(String path)
           
 int lstat(String path, FileStat stat)
           
 int mkdir(String path, int mode)
           
 ProcessMaker newProcessMaker()
           
 ProcessMaker newProcessMaker(String... command)
           
 int open(CharSequence path, int flags, int perm)
           
 int pipe(int[] fds)
           
 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, Collection<? extends CharSequence> argv, Collection<? extends CharSequence> envp)
           
 int pread(int fd, byte[] buf, int n, int offset)
           
 int pread(int fd, ByteBuffer buf, int n, int offset)
           
 int pwrite(int fd, byte[] buf, int n, int offset)
           
 int pwrite(int fd, ByteBuffer buf, int n, int offset)
           
 int read(int fd, byte[] buf, int n)
           
 int read(int fd, ByteBuffer buf, int n)
           
 String readlink(String path)
           
 int recvmsg(int socket, MsgHdr message, int flags)
           
 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()
           
 int setpgid(int pid, int pgid)
           
 int setpgrp(int pid, int pgrp)
           
 int setpriority(int which, int who, int prio)
           
 int setpwent()
           
 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)
           
 int symlink(String oldpath, String newpath)
           
 long sysconf(jnr.constants.platform.Sysconf name)
           
 Times times()
           
 int umask(int mask)
           
 int unlink(CharSequence path)
           
 int unsetenv(String envName)
           
 int utimes(String path, long[] atimeval, long[] mtimeval)
           
 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)
           
 int write(int fd, ByteBuffer buf, int n)
           
 

Method Detail

crypt

CharSequence crypt(CharSequence key,
                   CharSequence salt)

allocateStat

FileStat allocateStat()

chmod

int chmod(String filename,
          int mode)

fchmod

int fchmod(int fd,
           int mode)

chown

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

fchown

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

exec

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


exec

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


execv

int execv(String path,
          String[] argv)

execve

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

fork

int fork()

fstat

FileStat fstat(FileDescriptor descriptor)

fstat

FileStat fstat(int descriptor)

fstat

int fstat(FileDescriptor descriptor,
          FileStat stat)

fstat

int fstat(int fd,
          FileStat stat)

getenv

String getenv(String envName)

getegid

int getegid()

geteuid

int geteuid()

seteuid

int seteuid(int euid)

getgid

int getgid()

getdtablesize

int getdtablesize()

getlogin

String getlogin()

getpgid

int getpgid()

getpgid

int getpgid(int pid)

getpgrp

int getpgrp()

getpid

int getpid()

getppid

int getppid()

getpriority

int getpriority(int which,
                int who)

getpwent

Passwd getpwent()

getpwuid

Passwd getpwuid(int which)

getpwnam

Passwd getpwnam(String which)

getgrgid

Group getgrgid(int which)

getgrnam

Group getgrnam(String which)

getgrent

Group getgrent()

endgrent

int endgrent()

setgrent

int setgrent()

endpwent

int endpwent()

setpwent

int setpwent()

getuid

int getuid()

isatty

boolean isatty(FileDescriptor descriptor)

kill

int kill(int pid,
         int signal)

signal

SignalHandler signal(jnr.constants.platform.Signal sig,
                     SignalHandler handler)

lchmod

int lchmod(String filename,
           int mode)

lchown

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

link

int link(String oldpath,
         String newpath)

lstat

FileStat lstat(String path)

lstat

int lstat(String path,
          FileStat stat)

mkdir

int mkdir(String path,
          int mode)

readlink

String readlink(String path)
                throws IOException
Throws:
IOException

rmdir

int rmdir(String path)

setenv

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

setsid

int setsid()

setgid

int setgid(int gid)

setegid

int setegid(int egid)

setpgid

int setpgid(int pid,
            int pgid)

setpgrp

int setpgrp(int pid,
            int pgrp)

setpriority

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

setuid

int setuid(int uid)

stat

FileStat stat(String path)

stat

int stat(String path,
         FileStat stat)

symlink

int symlink(String oldpath,
            String newpath)

umask

int umask(int mask)

unsetenv

int unsetenv(String envName)

utimes

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

futimes

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

waitpid

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

waitpid

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

wait

int wait(int[] status)

errno

int errno()

errno

void errno(int value)

chdir

int chdir(String path)

isNative

boolean isNative()

libc

LibC libc()
Returns null if isNative returns false.


newProcessMaker

ProcessMaker newProcessMaker(String... command)

newProcessMaker

ProcessMaker newProcessMaker()

sysconf

long sysconf(jnr.constants.platform.Sysconf name)

times

Times times()

posix_spawnp

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

posix_spawnp

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

flock

int flock(int fd,
          int operation)

dup

int dup(int fd)

dup2

int dup2(int oldFd,
         int newFd)

fcntlInt

int fcntlInt(int fd,
             jnr.constants.platform.Fcntl fcntlConst,
             int arg)

fcntl

int fcntl(int fd,
          jnr.constants.platform.Fcntl fcntlConst)

close

int close(int fd)

unlink

int unlink(CharSequence path)

open

int open(CharSequence path,
         int flags,
         int perm)

write

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

read

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

pwrite

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

pread

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

write

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

read

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

pwrite

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

pread

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

lseek

int lseek(int fd,
          long offset,
          int whence)

pipe

int pipe(int[] fds)

ftruncate

int ftruncate(int fd,
              long offset)

getcwd

String getcwd()

socketpair

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

sendmsg

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

recvmsg

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

allocateMsgHdr

MsgHdr allocateMsgHdr()

fcntl

int fcntl(int fd,
          jnr.constants.platform.Fcntl fcntlConst,
          int... arg)
Deprecated. This version does not pass args because jnr-ffi does not support variadic invocation.

fcntl(2)

See Also:
fcntlInt(int, jnr.constants.platform.Fcntl, int)

fsync

int fsync(int fd)

fdatasync

int fdatasync(int fd)


Copyright © 2014. All Rights Reserved.