mountpoints-1.0.1: list mount points

Safe HaskellSafe
LanguageHaskell98

System.MountPoints

Description

 

Synopsis

Documentation

data Mntent Source

This is a stripped down mntent, containing only fields available everywhere.

Constructors

Mntent 

Fields

mnt_fsname :: String

what's mounted

mnt_dir :: FilePath

where it's mounted

mnt_type :: String

what sort of filesystem is mounted

getMounts :: IO [Mntent] Source

Get currently mounted filesystems.

This uses eiher getmntent or getmntinfo, depending on the OS.

getProcMounts :: IO [Mntent] Source

Read /proc/mounts to get currently mounted filesystems.

This works on Linux and related systems, including Android. Note that on Android, getMounts will always return [], so use this instead.