monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilityexperimental
Maintainermoepi
Safe HaskellSafe-Inferred

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

forall a . FsInfo a => FSI a 

class FsInfo a whereSource

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 IntSource

Get the bytes free on the file system

getFsSize :: a -> IO IntSource

Get the total size of the file system

getFsUsed :: a -> IO IntSource

Get the bytes used by the file system

getFsAll :: a -> IO (Int, Int, Int)Source

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

fsToFSI :: FsInfo a => a -> FSISource

Wrap a FsInfo into an FSI

blBasePath :: StringSource

The base path of block devices on the system

devToMapper :: String -> IO [String]Source

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

mapperToDev :: String -> IO [String]Source

Get the physical block devices supporting some device