diff options
author | Mario Torre <neugens@limasoftware.net> | 2007-11-06 13:38:39 +0000 |
---|---|---|
committer | Mario Torre <neugens@limasoftware.net> | 2007-11-06 13:38:39 +0000 |
commit | f4dbe7089736fdd7366bd05a605837dd64503277 (patch) | |
tree | 6c721ff9be14c422c65b07ada949a97cd9b78ea7 /vm | |
parent | fb62a205d6958df7d73355fa3dbd4c93f9b4bbcd (diff) | |
download | classpath-f4dbe7089736fdd7366bd05a605837dd64503277.tar.gz |
2007-11-06 Mario Torre <neugens@limasoftware.net>
* vm/reference/java/io/VMFile.java:
(getTotalSpace): new method.
(getUsableSpace): likewise.
(getFreeSpace): likewise.
* java/io/File.java: (getTotalSpace): new method.
(getUsableSpace): likewise.
(getFreeSpace): likewise.
* native/jni/java-io/java_io_VMFile.c:
(Java_java_io_VMFile_getTotalSpace): new function.
(Java_java_io_VMFile_getFreeSpace): likewise.
(Java_java_io_VMFile_getUsableSpace): likewise.
* native/jni/native-lib/cpio.h: (cpio_df): new function.
(CPFILE_DF_TYPE): enum type for cpio_df.
* native/jni/native-lib/cpio.c: (cpio_df): new function.
* include/java_io_VMFile.h: regenerated.
* configure.ac: added check for statvfs.
Diffstat (limited to 'vm')
-rw-r--r-- | vm/reference/java/io/VMFile.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vm/reference/java/io/VMFile.java b/vm/reference/java/io/VMFile.java index 4f708a4a5..4e997b2fb 100644 --- a/vm/reference/java/io/VMFile.java +++ b/vm/reference/java/io/VMFile.java @@ -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, |