Is there a way in Java to find out the available free space on a disk drive?

John Zukowski

Prior to Java 6, short of using JNI, there was no built in support.

With Java 6, you can use the new methods of the File class: getUsableSpace() and getTotalSpace().

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.