net.rubygrapefruit.platform.internal
Class DefaultPosixFile

java.lang.Object
  extended by net.rubygrapefruit.platform.internal.DefaultPosixFile
All Implemented Interfaces:
NativeIntegration, PosixFile

public class DefaultPosixFile
extends java.lang.Object
implements PosixFile


Constructor Summary
DefaultPosixFile()
           
 
Method Summary
 int getMode(java.io.File file)
          Gets the mode for the given file.
 java.lang.String readLink(java.io.File link)
          Reads the contents of a symbolic link.
 void setMode(java.io.File file, int perms)
          Sets the mode for the given file.
 void symlink(java.io.File link, java.lang.String contents)
          Creates a symbolic link.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPosixFile

public DefaultPosixFile()
Method Detail

setMode

public void setMode(java.io.File file,
                    int perms)
Description copied from interface: PosixFile
Sets the mode for the given file.

Specified by:
setMode in interface PosixFile

getMode

public int getMode(java.io.File file)
Description copied from interface: PosixFile
Gets the mode for the given file.

Specified by:
getMode in interface PosixFile

readLink

public java.lang.String readLink(java.io.File link)
                          throws NativeException
Description copied from interface: PosixFile
Reads the contents of a symbolic link.

Specified by:
readLink in interface PosixFile
Throws:
NativeException - On failure.

symlink

public void symlink(java.io.File link,
                    java.lang.String contents)
             throws NativeException
Description copied from interface: PosixFile
Creates a symbolic link.

Specified by:
symlink in interface PosixFile
Throws:
NativeException - On failure.