Java needs to provide a standard method for determining available disk
space given a path. As it stands, the only indication Java provides is
the exception generated when space is exhausted. This is unacceptable as
it does not allow an application to determine when space is low and warn
the user or take other action before the space is exhausted and serious
side effects occur. Java is a multi-platform programming environment that
should provide this functionality in the JRE through a standard API call.
Requiring the programmer to write platform specific code for every possible
platform is not acceptable for such a basic function common to all platforms.
###@###.### 2003-12-16

Comments

SUGGESTED FIX
Ideally a FileSystem class should be created which would provide
access to all common operations such as this. See Bug 4125893.
At the very least, a method needs to be available that would take
a path and return the available space in bytes for that path.
###@###.### 2003-12-16

2003-12-16

WORK AROUND
As it stands, a Java programmer that wishes to avoid serious
damage to a user's system must use native code or Runtime.exec
calls that are platform specific for every possible platform
the app might be run on.
This is unacceptable.
###@###.### 2003-12-16