diff options
Diffstat (limited to 'libjava/classpath/vm/reference/java/io/VMFile.java')
-rw-r--r-- | libjava/classpath/vm/reference/java/io/VMFile.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libjava/classpath/vm/reference/java/io/VMFile.java b/libjava/classpath/vm/reference/java/io/VMFile.java index 4f708a4a589..2a2751765ec 100644 --- a/libjava/classpath/vm/reference/java/io/VMFile.java +++ b/libjava/classpath/vm/reference/java/io/VMFile.java @@ -80,10 +80,10 @@ final class VMFile static native boolean create(String path) throws IOException; /* - * This native function actually produces the list of file in this + * This native function actually produces the list of files in this * directory */ - static native String[] list(String dirpath); + static native synchronized String[] list(String dirpath); /* * This native method actually performs the rename. @@ -117,6 +117,21 @@ final class VMFile static native boolean mkdir(String dirpath); /** + * Gets the total bytes of the filesystem named by path. + */ + public static native long getTotalSpace(String path); + + /** + * Gets the total free bytes of the filesystem named by path. + */ + public static native long getFreeSpace(String path); + + /** + * Gets the available bytes of the filesystem named by path. + */ + public static native long getUsableSpace(String path); + + /** * Set the read permission of the file. */ public static synchronized native boolean setReadable(String path, |