monky-2.2.1.0: A system state collecting library and application

Maintainermoepi
Stabilityexperimental
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

Monky.Disk.Common

Description

This provides the class used by file system specific implementations

Synopsis

Documentation

data FSI Source #

Existential datatype to wrap FsInfo instances

Constructors

FsInfo a => FSI a 

class FsInfo a where Source #

Type class that should be instanciated by file system handlers

The Monky.Disk module is designed to work with different handlers specialized for different file systems and a generic block device handler.

This typeclass gives the interface a file system handler has to implement to be usable.

Methods

getFsFree :: a -> IO Integer Source #

Get the bytes free on the file system

getFsSize :: a -> IO Integer Source #

Get the total size of the file system

getFsUsed :: a -> IO Integer Source #

Get the bytes used by the file system

getFsAll :: a -> IO (Integer, Integer, Integer) Source #

Get all data, might be more efficient (Size, Free, Used)

fsToFSI :: FsInfo a => a -> FSI Source #

Wrap a FsInfo into an FSI

blBasePath :: String Source #

The base path of block devices on the system

devToMapper :: Dev -> IO [Label] Source #

Get the "top most" virtual device(s) based on the physical device

mapperToDev :: Label -> IO [Dev] Source #

Get the physical block devices supporting some device

newtype Dev Source #

Constructors

Dev 

Fields

Instances

Eq Dev Source # 

Methods

(==) :: Dev -> Dev -> Bool #

(/=) :: Dev -> Dev -> Bool #

Ord Dev Source # 

Methods

compare :: Dev -> Dev -> Ordering #

(<) :: Dev -> Dev -> Bool #

(<=) :: Dev -> Dev -> Bool #

(>) :: Dev -> Dev -> Bool #

(>=) :: Dev -> Dev -> Bool #

max :: Dev -> Dev -> Dev #

min :: Dev -> Dev -> Dev #

Show Dev Source # 

Methods

showsPrec :: Int -> Dev -> ShowS #

show :: Dev -> String #

showList :: [Dev] -> ShowS #

newtype Label Source #

Constructors

Label 

Fields

Instances

Eq Label Source # 

Methods

(==) :: Label -> Label -> Bool #

(/=) :: Label -> Label -> Bool #

Ord Label Source # 

Methods

compare :: Label -> Label -> Ordering #

(<) :: Label -> Label -> Bool #

(<=) :: Label -> Label -> Bool #

(>) :: Label -> Label -> Bool #

(>=) :: Label -> Label -> Bool #

max :: Label -> Label -> Label #

min :: Label -> Label -> Label #

Show Label Source # 

Methods

showsPrec :: Int -> Label -> ShowS #

show :: Label -> String #

showList :: [Label] -> ShowS #