[Haskell-cafe] listing mountpoints and getting their properties in Haskell

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Feb 28 08:35:55 EST 2010


On Feb 28, 2010, at 05:17 , Matthias Kilian wrote:
> On Sat, Feb 27, 2010 at 06:27:19PM -0500, Brandon S. Allbery KF8NH  
> wrote:
>> I don't know of any Haskell bindings offhand, but getmntent() and
>> friends are the standard library interface for identifying  
>> mountpoints
>> and statfs()/statvfs() are the interface for getting information  
>> about
>> them.  Be aware that the latter can be fairly system-dependent.
>
> getmntent() isn't in any standard I know about. IMHO, getting
> information about mounted filesystems will always be system dependent.

It's more of a de-facto standard, inherited from System V but not part  
of SVID and successors.  Between Linux/glibc and Solaris you have a  
goodly chunk of the GHC-relevant world.

*BSD and Mac OS X should look at getmntinfo(); I suspect that'll be  
painful to get at via the FFI, though.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100228/eb728dc6/PGP.bin


More information about the Haskell-Cafe mailing list