How to find how much disk space is left using Java?
Have a look at the File class documentation. This is one of the new features in 1.6.
These new methods also include:
public long getTotalSpace()
public long getFreeSpace()
public long getUsableSpace()
If you're still using 1.5 then you can use the Apache Commons IO library and its FileSystem class
1.4m articles
1.4m replys
5 comments
57.0k users