[Haskell-cafe] listing mountpoints and getting their properties
in Haskell
Andrew Coppin
andrewcoppin at btinternet.com
Sat Feb 27 11:58:03 EST 2010
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.
More information about the Haskell-Cafe
mailing list