• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Design or coding required for finding free diskspace

 
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
 
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.
 
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.
 
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!
 
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
 
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.

 
Don't listen to Steve. Just read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!