
27 Feb
2010
27 Feb
'10
11:58 a.m.
Eugene Dzhurinsky wrote:
Hello!
I need to list all currently mounted filesystems and get some stats like total space, free space, mount point and physical device.
Is there any library capable of obtaining such information from OS itself? Parsing output of 'df' is locale-dependent and error-prone (because of locale settings, output settings etc).
Stuff like mount points is Unix-specific, so have a dig around inside the POSIX library. (System.Posix.Files looks promising...) Finding the total free space on a filesystem is something that ought to be possible in a portable way though, and I don't see anything in the standard libraries for doing this.