[Mono-devel-list] How to determine free disk space?

Alex Chudnovsky alexc at majestic12.co.uk
Wed Mar 30 08:01:21 EST 2005


Jonathan Pryor wrote:

>On Tue, 2005-03-29 at 17:47 +0100, Alex Chudnovsky wrote:
>  
>
>>I am trying to convert Win32 specific code to Mono to determine free 
>>disk space available on a given drive. There does not appear to be a
>>nice portable way to do it, and I am not too keen on spawning "df" to
>>determine free space. Perhaps I am missing something and it can be
>>easily done with Mono and/or .Net itself?
>>    
>>
>
>This won't be portable until .NET 2.0 with the System.IO.DriveInfo
>class.  If you need a solution now, you can use the
>Mono.Unix.UnixDriveInfo.AvailableFreeSpace property (in Mono.Posix.dll),
>though this will require Mono 1.1.4 or later.
>  
>
That will do me, thanks! I did check Unix name space docs on site but it 
looked as if like
everything was not implemented, specifically this class is said "to be 
added":

http://www.go-mono.com/docs/monodoc.ashx?tlink=1@N%3aMono.Unix

I take it API docs are a bit out of date then...

cheers

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050330/6cb54fc7/attachment.html 


More information about the Mono-devel-list mailing list