Portability | Linux |
---|---|
Stability | experimental |
Maintainer | ongy |
Safe Haskell | None |
This module allows to read generic information about a block device and its file system.
It only works if the file system is mounted when the handle is created since it needs to *find* the mount point to get information about the file system
- data BlockHandle = BlockH FilePath
- getBlockHandle :: String -> IO (Maybe (BlockHandle, String))
- devToMount :: String -> IO (Maybe String)
Documentation
getBlockHandle :: String -> IO (Maybe (BlockHandle, String))Source
Get a fs handle for normal
devices
This uses fsStat to get file system information.
fsStat takes the mount point of the file system, so we need to find the mount point.
In case of mapper devices, this is done by going through the chain of slaves.
devToMount :: String -> IO (Maybe String)Source
Get the mountpoint of a device.
Returns a mointpoint of a device. If there are multiple mountpoints, this will return the first one found. First one is mostly determined by order in procmounts and should be the one that was mounted first (time since boot).