Added @ThreadSafe.

This commit is contained in:
Adam Murdoch
2012-09-08 10:19:26 +10:00
parent 65e2610eef
commit 182efebb40
3 changed files with 12 additions and 0 deletions

View File

@@ -5,24 +5,29 @@ import java.io.File;
/**
* Information about a file system. This is a snapshot view and does not change.
*/
@ThreadSafe
public interface FileSystem {
/**
* Returns the root directory of this file system.
*/
@ThreadSafe
File getMountPoint();
/**
* Returns the operating system specific name for the type of this file system.
*/
@ThreadSafe
String getFileSystemType();
/**
* Returns true if this file system is a remote file system, or false if local.
*/
@ThreadSafe
boolean isRemote();
/**
* Returns the operating system specific name for this file system.
*/
@ThreadSafe
String getDeviceName();
}

View File

@@ -5,11 +5,13 @@ import java.util.List;
/**
* Provides access to the file systems of the current machine.
*/
@ThreadSafe
public interface FileSystems extends NativeIntegration {
/**
* Returns the set of all file systems for the current machine.
*
* @throws NativeException On failure.
*/
@ThreadSafe
List<FileSystem> getFileSystems() throws NativeException;
}

View File

@@ -5,12 +5,14 @@ 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;
/**
@@ -18,6 +20,7 @@ public interface PosixFile extends NativeIntegration {
*
* @throws NativeException On failure.
*/
@ThreadSafe
int getMode(File path) throws NativeException;
/**
@@ -25,6 +28,7 @@ public interface PosixFile extends NativeIntegration {
*
* @throws NativeException On failure.
*/
@ThreadSafe
void symlink(File link, String contents) throws NativeException;
/**
@@ -32,5 +36,6 @@ public interface PosixFile extends NativeIntegration {
*
* @throws NativeException On failure.
*/
@ThreadSafe
String readLink(File link) throws NativeException;
}