Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to find out free diskspace?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sylvain LE GALL <sylvain.le-gall@p...>
Subject: Re: [Caml-list] How to find out free diskspace?
Hello,

On Fri, Jul 01, 2005 at 06:28:21PM +0200, Bernd Kuhls wrote:
> Hi,
> 
> I am looking for some Ocaml code (or C bindings which work on 
> Linux/Solaris/Cygwin) to get the amount of free diskspace on a volume. 
> The function should receive a string and return an int64 value or 
> something similar.
> 
> Regards, Bernd
> 

Well, i think you can get this information using the C call "statfs"
combined with the reading of /etc/mtab, on linux.

For windows i remember that you can open some special files at the root
of each volume, which should give you information about this...

If you find a solution, could you drop me an email, i would like to
integrate it in one of my library.

Thank you
Regard
Sylvain Le Gall