help: amount of free disk space?

E

entropy

Looking for a class that will allow the underlying disk hardware to
be queried for the amount of free space available.

RTFM'ing like crazy. Newbie, so it's taking longer.
 
B

Bernard

AFAIK not part of the JDK.

Try

http://www.tolstoy.com/samizdat/jconfig.html


If you can restrict yourself to Windows only then the parsing the
output of the DIR command works well.

Good small programming exercise, switching between Win9x (using START
/m /w because of DOS 127 characters command line limitation)
and NT, working with external process using multiple threads to avoid
nasty surprises are the only things to overcome.

Sooner or later you need to deal with these anyway, so the exercise is
worthwhile.

Regards,

Bernard
 
E

entropy

(e-mail address removed) wrote...
Unix has 'df' command.

Yeow. I remember all the crap Marc Andreesson took for using the
system() function to delete files. It was such a naive solution.
That was in 1993. I am grateful for the suggestions, but I'm also
dismayed that Java apparently requires something so hokey in 2005.

I'm thinking that I oughta just write a small C program to do this,
and then figure out how to use JNI or something to invoke it. Does
that make sense?
 
L

Lisa

entropy said:
(e-mail address removed) wrote...

Yeow. I remember all the crap Marc Andreesson took for using the
system() function to delete files. It was such a naive solution.
That was in 1993. I am grateful for the suggestions, but I'm also
dismayed that Java apparently requires something so hokey in 2005.

I'm thinking that I oughta just write a small C program to do this,
and then figure out how to use JNI or something to invoke it. Does
that make sense?
That's what I did, but then I was interested in figuring out
how to use JNI and dll files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top