org.jruby.ext.posix
Class JavaLibCHelper

java.lang.Object
  extended by org.jruby.ext.posix.JavaLibCHelper

public class JavaLibCHelper
extends Object

This libc implementation is created one per runtime instance versus the others which are expected to be one static instance for whole JVM. Because of this it is no big deal to make reference to a POSIXHandler directly.


Field Summary
static int STDERR
           
static int STDIN
           
static int STDOUT
           
 
Constructor Summary
JavaLibCHelper(POSIXHandler handler)
           
 
Method Summary
 int chmod(String filename, int mode)
           
 int chown(String filename, int user, int group)
           
 int endpwent()
           
 Map<String,String> getEnv()
           
 int getfd(FileDescriptor descriptor)
           
 long gethandle(FileDescriptor descriptor)
           
 String getlogin()
           
 int getpid()
           
 Passwd getpwent()
           
 Passwd getpwuid(int which)
           
 int isatty(int fd)
           
 int link(String oldpath, String newpath)
           
 int lstat(String path, FileStat stat)
           
 int mkdir(String path, int mode)
           
 int readlink(String oldpath, ByteBuffer buffer, int length)
           
 int setpwent()
           
 int stat(String path, FileStat stat)
           
 int symlink(String oldpath, String newpath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STDIN

public static final int STDIN
See Also:
Constant Field Values

STDOUT

public static final int STDOUT
See Also:
Constant Field Values

STDERR

public static final int STDERR
See Also:
Constant Field Values
Constructor Detail

JavaLibCHelper

public JavaLibCHelper(POSIXHandler handler)
Method Detail

chmod

public int chmod(String filename,
                 int mode)

chown

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

getfd

public int getfd(FileDescriptor descriptor)

gethandle

public long gethandle(FileDescriptor descriptor)

getlogin

public String getlogin()

getpid

public int getpid()

getpwent

public Passwd getpwent()

setpwent

public int setpwent()

endpwent

public int endpwent()

getpwuid

public Passwd getpwuid(int which)

isatty

public int isatty(int fd)

link

public int link(String oldpath,
                String newpath)

lstat

public int lstat(String path,
                 FileStat stat)

mkdir

public int mkdir(String path,
                 int mode)

stat

public int stat(String path,
                FileStat stat)

symlink

public int symlink(String oldpath,
                   String newpath)

readlink

public int readlink(String oldpath,
                    ByteBuffer buffer,
                    int length)
             throws IOException
Throws:
IOException

getEnv

public Map<String,String> getEnv()


Copyright © 2012. All Rights Reserved.