mountpoints-1.0.2: list mount points

Safe Haskell | Safe
Language | Haskell98

System.MountPoints

Description

Synopsis

- data Mntent = Mntent {
  - mnt_fsname :: String
  - mnt_dir :: FilePath
  - mnt_type :: String
  }
- getMounts :: IO [Mntent]
- getProcMounts :: IO [Mntent]

# Documentation

data Mntent #

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

Instances

Eq Mntent # |
Methods (==) :: Mntent -> Mntent -> Bool # (/=) :: Mntent -> Mntent -> Bool #
Ord Mntent # |
Methods compare :: Mntent -> Mntent -> Ordering # (<) :: Mntent -> Mntent -> Bool # (<=) :: Mntent -> Mntent -> Bool # (>) :: Mntent -> Mntent -> Bool # (>=) :: Mntent -> Mntent -> Bool # max :: Mntent -> Mntent -> Mntent # min :: Mntent -> Mntent -> Mntent #
Show Mntent # |
Methods showsPrec :: Int -> Mntent -> ShowS # show :: Mntent -> String # showList :: [Mntent] -> ShowS #

getMounts :: IO [Mntent] #

Get currently mounted filesystems.

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

getProcMounts :: IO [Mntent] #

Read /proc/mounts to get currently mounted filesystems.

This works on Linux and related systems, including Android.