Reputation: 2917
I want to print the number of bytes of all free space of a partition using File.getUsuableSpace()
but it returns another value than the df command (in Linux) does.
It does not differ that much, but it differs in several megabytes.
What could be the case?
Upvotes: 3
Views: 1891
Reputation: 1
This will only give the available space, try getFreeSpace()
will return the free space and not available to use space. This works in Java 1.6, for more information, look at the File class documentation.
Upvotes: 0