Re: How to find local systems free space?
Code:
File disk = new File("c:");
System.out.println("disk.getTotalSpace() = " + disk.getTotalSpace());
System.out.println("disk.getFreeSpace() = " + disk.getFreeSpace());
System.out.println("disk.getUsableSpace() = " + disk.getUsableSpace());
Read the API docs for the methods to get full details.
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents...
N. Borenstein
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Bookmarks