A DESCRIPTION OF THE PROBLEM :
The link https://docs.oracle.com/javase/8/docs/api/java/io/File.html#getUsableSpace-- says:
The returned number of available bytes is a hint, but not a guarantee, that it is possible to use most or any of these bytes. The number of **unallocated** bytes is most likely to be accurate immediately after this call. It is likely to be made inaccurate by any external I/O operations including those made on the system outside of this virtual machine. This method makes no guarantee that write operations to this file system will succeed.
compared with the java doc of the getFreeSpace, it should be a bug or typo here saying **unallocated** here for this getUsableSpace API.
The link https://docs.oracle.com/javase/8/docs/api/java/io/File.html#getUsableSpace-- says:
The returned number of available bytes is a hint, but not a guarantee, that it is possible to use most or any of these bytes. The number of **unallocated** bytes is most likely to be accurate immediately after this call. It is likely to be made inaccurate by any external I/O operations including those made on the system outside of this virtual machine. This method makes no guarantee that write operations to this file system will succeed.
compared with the java doc of the getFreeSpace, it should be a bug or typo here saying **unallocated** here for this getUsableSpace API.
- links to