linux-mount-0.1.0.2: Mount and unmount filesystems

Copyright© 2013-2014 Nicola Squartini
LicenseBSD3
MaintainerNicola Squartini <tensor5@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

System.Linux.Mount

Contents

Description

This module provides an interface to the system mount and umount functions.

Synopsis

Bindings to system functions

mount Source

Arguments

:: String

Device file

-> FilePath

Mount point

-> String

Filesystem type

-> [MountFlag]

List of mount options

-> DriverData

Driver specific options

-> IO () 

Mount a filesystem (call to mount()).

umount Source

Arguments

:: FilePath

Mount point

-> IO () 

Unmount a filesystem (call to umount()).

umountWith Source

Arguments

:: UmountFlag

Unmount option

-> Bool

True follow symbolic links, False do not follow

-> FilePath

Mount point

-> IO () 

Unmount a filesystem using specific unmount options (call to umount2()). See UmountFlag for details.

Mount flags

data MountFlag Source

A filesystem independent option to be used when mounting a filesystem.

Driver data

type DriverData = ByteString Source

Filesystem dependent options to be used when mounting a filesystem; the content of DriverData is passed directly to the filesystem driver.

Unmount flags

data UmountFlag Source

A filesystem independent option to be used when unmounting a filesystem.

Constructors

Plain

Plain unmount, behaves like umount.

Force

Force unmount even if busy.

Detach

Perform a lazy unmount: make the mount point unavailable for new accesses, and actually perform the unmount when the mount point ceases to be busy.

Expire

Mark the mount point as expired. If a mount point is not currently in use, then an initial call to umountWith with this flag fails with the error EAGAIN, but marks the mount point as expired. The mount point remains expired as long as it isn't accessed by any process. A second umountWith call specifying Expire unmounts an expired mount point.