Ticket #115 (closed defect: invalid)
JavaIO
| Reported by: | ebm1991 | Owned by: | |
|---|---|---|---|
| Priority: | Feedback Pending | Milestone: | |
| Component: | general | Version: | 1.6.0-b22 WSE |
| Severity: | medium | Keywords: | |
| Cc: |
Description
the methods to obtain disk space not all working correctly, no return is
obtained.
getFreeSpace()
getTotalSpace()
I am writing a file manager and testing in Windows and eCS.
will continue testing.
Change History
comment:1 Changed 2 years ago by dmik
- Priority changed from major to Feedback Pending
- Severity changed from highest to medium
comment:2 Changed 17 months ago by diver
- Status changed from new to closed
- Resolution set to invalid
as our test showed it works and no more feedback i assume it's fixed. if you still have problems use latest odin, retry and open a new ticket if it's still not working. but in the new ticket also show the code you use.
Note: See
TracTickets for help on using
tickets.

Thank you for the report. I assume that you mean the methods of the java.io.File class. And they work as designed (tested with the WSE build). This sample program:
import java.io.*; class test_free_space extends Object { private static void test(final String drive) { try { File f = new File(drive); System.out.println("Free space on " + f.getCanonicalPath() + " is " + f.getFreeSpace()); System.out.println("Total space on " + f.getCanonicalPath() + " is " + f.getTotalSpace()); } catch (Exception e) { e.printStackTrace(); } } public static void main( String args[] ) { test("C:\\"); test("D:\\"); test("X:\\"); } }gives me the correct amounts of free and total space for the tested drives.
Please check everything again and clarify your bug report.