[Mono-dev] [PATCH] DriveInfo implementation - volume space

Javier Martín lordhabbit at gmail.com
Fri Dec 7 22:40:46 EST 2007


Hey people,

I've added the requested protection for systems without statvfs.h -
now the simulated win32 call returns ERROR_NOT_SUPPORTED, which makes
the internal call throw a NotSupportedException. I still think the two
new files should stay separate, both to avoid incrementing the already
considerable clutter in other files and because it's very probable
they eventually receive more functions.

About the test case, I've not written it mainly because I don't really
know what to test for. M$s spec is quite lame, describing only the
windows-specific case (and not even all of them - what will the class
do with junction points is not specified). If anyone wants to write a
test to check that DriveInfo throws ArgumentNullException when null is
fed to its constructor, well, just do it o_O.

This is the last version I send of this patch - not because I've
become fed up nor anything like that, it's just that I'm leaving the
city for the weekend and won't be online again until Sunday afternoon
(GMT+1). I would really want the functionality brought by this patch
to be included in Mono as soon as sanely possible, since I really need
the free space meters for a project of mine and I'm not really
comfortable running my many .net systems on an SVN version of Mono
(remember Miguel's laptop at the first day of the Summit?). So, please
run any tests you need to and contact me if you need anything (or just
feel free to modify the code I added). I'm glad to be of _any_ help to
a project which has helped me a lot.

Habbit

PS: About licensing, I've already declared/sworn the code I posted is
of my writing and that I agree to license it under the X11 license
with no exceptions or additional terms.



More information about the Mono-devel-list mailing list