[Mono-devel-list] How to determine free disk space?
Jonathan Pryor
jonpryor at vt.edu
Wed Mar 30 07:04:20 EST 2005
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.
- Jon
More information about the Mono-devel-list
mailing list