-------- Original Message --------
Subject: Re: JNI link to disk space
Date: Tue, 19 Oct 1999 15:11:45 +0100
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
>
> [EMAIL PROTECTED] wrote:
> >
> > Peter Pilgrim 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?
On Solaris 2.5.1 I found `/usr/include/statfs.h'
Maybe it exists on linux too.
struct statfs {
short f_fstyp; //FS type
long f_bsize; // block size
long f_frsize; // fragment size
long f_blocks; // total number of blocks
long f_bfree; // total numner of free blocks
..
char f_fname[6]; // Volumne name
char f_fpack[6]; // Pack name
}
int statfs( const char *, struct statfs *, int, int );
--
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]