-
March 14th, 2009, 04:10 AM
#1
How to find local systems free space?
Hi all,
Can any one tell me, how to find C: free space in windows using java?
-
March 14th, 2009, 05:15 AM
#2
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.
-
March 14th, 2009, 06:32 AM
#3
Re: How to find local systems free space?
hi dlorde,
its working fine. Thanks for ur kind reply.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|