[EMAIL PROTECTED] wrote:
>
> > > > > I am interesting in getting the disk space and partition
> > > > > in a Java program by using JNI. What is the std UNIX API
> > > > > call to do this? I have tried grepping the man pages
> > > > > and got the source to kdf program but it didn't help
> > > > > because it was executing `/usr/bin/df -k -T' and parsing
> > > > > the output. Is there a native portable UNIX system call that
> > > > > provides partition information and also disk space size and free
> > > > > information?
> >
>
> This might be a silly question but:
> Why don't you just look at the source code of "df"? I thought the sources
> were always included in GNU software?
> You could then take the piece of code found in "df" and use it in your own
> program.
>
> ..cu
>
> Jörg
I already have and with out looking at too deeply it really a combo
of use the functions and structures in `/usr/include/sys/mntent.h'
and `/usr/include/sys/statfs.h'.
Also not also output from df are standard or compatible so you
would have to parse output of `df-k' and java.lang.Process.exec() et al
--
Adios
Peter
-----------------------------------------------------------------
import std.Disclaimer; // More Java for your Lava, Mate.
"Give the man, what he wants. £££" [on Roy Keane, Quality Player]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]