org.jruby.ext.posix
Class BaseNativePOSIX
java.lang.Object
org.jruby.ext.posix.BaseNativePOSIX
- All Implemented Interfaces:
- POSIX
- Direct Known Subclasses:
- FreeBSDPOSIX, LinuxPOSIX, MacOSPOSIX, OpenBSDPOSIX, SolarisPOSIX, WindowsPOSIX
public abstract class BaseNativePOSIX
- extends Object
- implements POSIX
Nested classes/interfaces inherited from interface org.jruby.ext.posix.POSIX |
POSIX.ERRORS |
Method Summary |
abstract FileStat |
allocateStat()
|
int |
chmod(String filename,
int mode)
|
int |
chown(String filename,
int user,
int group)
|
int |
endgrent()
|
int |
endpwent()
|
int |
errno()
|
void |
errno(int value)
|
int |
fork()
|
FileStat |
fstat(FileDescriptor fileDescriptor)
|
int |
getegid()
|
int |
geteuid()
|
int |
getfd(FileDescriptor descriptor)
|
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()
|
protected boolean |
hasMethod(String name)
Does the loaded library have the method specified |
boolean |
isatty(FileDescriptor fd)
|
int |
kill(int pid,
int signal)
|
int |
lchmod(String filename,
int mode)
|
int |
lchown(String filename,
int user,
int group)
|
int |
link(String oldpath,
String newpath)
|
FileStat |
lstat(String path)
|
int |
mkdir(String path,
int mode)
|
String |
readlink(String oldpath)
|
int |
setegid(int egid)
|
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)
|
FileStat |
stat(String path)
|
int |
symlink(String oldpath,
String newpath)
|
int |
umask(int mask)
|
int |
utimes(String path,
long[] atimeval,
long[] mtimeval)
|
int |
wait(int[] status)
|
int |
waitpid(int pid,
int[] status,
int flags)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
libraryName
protected String libraryName
libc
protected LibC libc
handler
protected POSIXHandler handler
helper
protected JavaLibCHelper helper
GROUP
public static final BaseNativePOSIX.PointerConverter GROUP
BaseNativePOSIX
public BaseNativePOSIX(String libraryName,
LibC libc,
POSIXHandler handler)
chmod
public int chmod(String filename,
int mode)
- Specified by:
chmod
in interface POSIX
chown
public int chown(String filename,
int user,
int group)
- Specified by:
chown
in interface POSIX
fstat
public FileStat fstat(FileDescriptor fileDescriptor)
- Specified by:
fstat
in interface POSIX
getegid
public int getegid()
- Specified by:
getegid
in interface POSIX
geteuid
public int geteuid()
- Specified by:
geteuid
in interface POSIX
getgid
public int getgid()
- Specified by:
getgid
in interface POSIX
getlogin
public String getlogin()
- Specified by:
getlogin
in interface POSIX
getpgid
public int getpgid()
- Specified by:
getpgid
in interface POSIX
getpgrp
public int getpgrp()
- Specified by:
getpgrp
in interface POSIX
getpid
public int getpid()
- Specified by:
getpid
in interface POSIX
getppid
public int getppid()
- Specified by:
getppid
in interface POSIX
getpwent
public Passwd getpwent()
- Specified by:
getpwent
in interface POSIX
getpwuid
public Passwd getpwuid(int which)
- Specified by:
getpwuid
in interface POSIX
getpwnam
public Passwd getpwnam(String which)
- Specified by:
getpwnam
in interface POSIX
getgrent
public Group getgrent()
- Specified by:
getgrent
in interface POSIX
getgrgid
public Group getgrgid(int which)
- Specified by:
getgrgid
in interface POSIX
getgrnam
public Group getgrnam(String which)
- Specified by:
getgrnam
in interface POSIX
setpwent
public int setpwent()
- Specified by:
setpwent
in interface POSIX
endpwent
public int endpwent()
- Specified by:
endpwent
in interface POSIX
setgrent
public int setgrent()
- Specified by:
setgrent
in interface POSIX
endgrent
public int endgrent()
- Specified by:
endgrent
in interface POSIX
getuid
public int getuid()
- Specified by:
getuid
in interface POSIX
setegid
public int setegid(int egid)
- Specified by:
setegid
in interface POSIX
seteuid
public int seteuid(int euid)
- Specified by:
seteuid
in interface POSIX
setgid
public int setgid(int gid)
- Specified by:
setgid
in interface POSIX
getfd
public int getfd(FileDescriptor descriptor)
getpgid
public int getpgid(int pid)
- Specified by:
getpgid
in interface POSIX
setpgid
public int setpgid(int pid,
int pgid)
- Specified by:
setpgid
in interface POSIX
setpgrp
public int setpgrp(int pid,
int pgrp)
- Specified by:
setpgrp
in interface POSIX
setsid
public int setsid()
- Specified by:
setsid
in interface POSIX
setuid
public int setuid(int uid)
- Specified by:
setuid
in interface POSIX
kill
public int kill(int pid,
int signal)
- Specified by:
kill
in interface POSIX
lchmod
public int lchmod(String filename,
int mode)
- Specified by:
lchmod
in interface POSIX
lchown
public int lchown(String filename,
int user,
int group)
- Specified by:
lchown
in interface POSIX
link
public int link(String oldpath,
String newpath)
- Specified by:
link
in interface POSIX
lstat
public FileStat lstat(String path)
- Specified by:
lstat
in interface POSIX
mkdir
public int mkdir(String path,
int mode)
- Specified by:
mkdir
in interface POSIX
stat
public FileStat stat(String path)
- Specified by:
stat
in interface POSIX
symlink
public int symlink(String oldpath,
String newpath)
- Specified by:
symlink
in interface POSIX
readlink
public String readlink(String oldpath)
throws IOException
- Specified by:
readlink
in interface POSIX
- Throws:
IOException
umask
public int umask(int mask)
- Specified by:
umask
in interface POSIX
utimes
public int utimes(String path,
long[] atimeval,
long[] mtimeval)
- Specified by:
utimes
in interface POSIX
fork
public int fork()
- Specified by:
fork
in interface POSIX
waitpid
public int waitpid(int pid,
int[] status,
int flags)
- Specified by:
waitpid
in interface POSIX
wait
public int wait(int[] status)
- Specified by:
wait
in interface POSIX
getpriority
public int getpriority(int which,
int who)
- Specified by:
getpriority
in interface POSIX
setpriority
public int setpriority(int which,
int who,
int prio)
- Specified by:
setpriority
in interface POSIX
isatty
public boolean isatty(FileDescriptor fd)
- Specified by:
isatty
in interface POSIX
errno
public int errno()
- Specified by:
errno
in interface POSIX
errno
public void errno(int value)
- Specified by:
errno
in interface POSIX
allocateStat
public abstract FileStat allocateStat()
hasMethod
protected boolean hasMethod(String name)
- Does the loaded library have the method specified
- Parameters:
name
- of method to look for
- Returns:
- true if found. false otherwise
Copyright © 2011. All Rights Reserved.