net.rubygrapefruit.platform
Interface PosixFile

All Superinterfaces:
NativeIntegration
All Known Implementing Classes:
DefaultPosixFile

public interface PosixFile
extends NativeIntegration

Functions to query and modify a file's POSIX meta-data.


Method Summary
 int getMode(java.io.File path)
          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 path, int perms)
          Sets the mode for the given file.
 void symlink(java.io.File link, java.lang.String contents)
          Creates a symbolic link.
 

Method Detail

setMode

void setMode(java.io.File path,
             int perms)
             throws NativeException
Sets the mode for the given file.

Throws:
NativeException - On failure.

getMode

int getMode(java.io.File path)
            throws NativeException
Gets the mode for the given file.

Throws:
NativeException - On failure.

symlink

void symlink(java.io.File link,
             java.lang.String contents)
             throws NativeException
Creates a symbolic link.

Throws:
NativeException - On failure.

readLink

java.lang.String readLink(java.io.File link)
                          throws NativeException
Reads the contents of a symbolic link.

Throws:
NativeException - On failure.