linux-mount-0.1.0.2: Mount and unmount filesystems

Portabilityportable
Stabilityexperimental
MaintainerNicola Squartini <tensor5@gmail.com>
Safe HaskellNone

System.Linux.Mount

Contents

Description

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

Synopsis

Bindings to system functions

mountSource

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()).

umountSource

Arguments

:: FilePath

Mount point

-> IO () 

Unmount a filesystem (call to umount()).

umountWithSource

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 = ByteStringSource

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.