Opened 13 years ago

Closed 12 years ago

#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 (2)

comment:1 Changed 13 years ago by dmik

Priority: majorFeedback Pending
Severity: highestmedium

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.

comment:2 Changed 12 years ago by Silvan Scherrer

Resolution: invalid
Status: newclosed

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.