Files
jlibloader/src/main/java/net/rubygrapefruit/platform/PosixFile.java
2012-09-08 10:19:26 +10:00

42 lines
925 B
Java

package net.rubygrapefruit.platform;
import java.io.File;
/**
* Functions to query and modify a file's POSIX meta-data.
*/
@ThreadSafe
public interface PosixFile extends NativeIntegration {
/**
* Sets the mode for the given file.
*
* @throws NativeException On failure.
*/
@ThreadSafe
void setMode(File path, int perms) throws NativeException;
/**
* Gets the mode for the given file.
*
* @throws NativeException On failure.
*/
@ThreadSafe
int getMode(File path) throws NativeException;
/**
* Creates a symbolic link.
*
* @throws NativeException On failure.
*/
@ThreadSafe
void symlink(File link, String contents) throws NativeException;
/**
* Reads the contents of a symbolic link.
*
* @throws NativeException On failure.
*/
@ThreadSafe
String readLink(File link) throws NativeException;
}