• Post Reply Bookmark Topic Watch Topic
  • New Topic

Design or coding required for finding free diskspace  RSS feed

 
harsha harinath
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I introduce myself as Harsha.H, a final year student of Computer Sceience Emgineering. I am currently working on finding free diskspace using JAVA on different platforms such as Win, Linux, AIX, OS/2, etc., I have succeeded in doing this on Win platform. I need a design or source code to find diskspace on Linux and OS/2 platforms. Kindly do help me as I very keen on doing it. Thanking you in advance.

With regards,

Harsha
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by harsha harinath:
Hi,

I introduce myself as Harsha.H, a final year student of Computer Sceience Emgineering.


Thx for your introduction
Originally posted by harsha harinath:

I am currently working on finding free diskspace using JAVA on different platforms such as Win, Linux, AIX, OS/2, etc., I have succeeded in doing this on Win platform. I need a design or source code to find diskspace on Linux and OS/2 platforms. Kindly do help me as I very keen on doing it. Thanking you in advance.

With regards,

Harsha


You need to write a platform spesific code in c/c++ and need to call it in Java. developing a single routine will not be possible, need to develop different code for diff platform.
 
Tim Cao
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In most *nix, the command "df" will give you information on your hard drive (at least for those you have mounted). Try "df" in a terminal to see how the output is formatted. Then, you can use Process to invoke the command in Java and parse the output to get the desired information.
 
Stuart Ash
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But wondering, is there a platform-neutral way of doing this...
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stuart Ash:
But wondering, is there a platform-neutral way of doing this...


NO!
 
JuanP barbancho
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I make similar for a installer project. You must use JNI and call diferent routines depens on OS.

Thanks
 
Ray Horn
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like free disk space is implemented in the Mustang software. Following from:
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/Mustang_build39.html


Feature: Need way to find free disk space
Bug ID: 4057701
Status: Delivered in b39
Description: Many developers will recognize this requirement from the JDC bug parade. Finally, java.io.File is updated with methods to determine both partition sizes and usage and the amount of free space on each partition.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!