-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Mount and unmount filesystems -- -- Bindings to the Linux mount() and -- umount() syscalls. @package linux-mount @version 0.2.0.1 -- | linux-mount provides bindings to the Linux -- mount() and umount() syscalls. All -- functions below may fail with isPermissionError if the -- user does not have the required privileges. module System.Linux.Mount -- | Mount a filesystem (call to mount()). mount :: String -> FilePath -> String -> [MountFlag] -> DriverData -> IO () -- | Alter flags of a mounted filesystem (call to mount() -- with MS_REMOUNT). remount :: FilePath -> [MountFlag] -> DriverData -> IO () -- | A filesystem independent option to be used when mounting a filesystem. data MountFlag -- | Mount read-only (MS_RDONLY). ReadOnly :: MountFlag -- | Ignore suid and sgid bits (MS_NOSUID). NoSUID :: MountFlag -- | Disallow access to device special files (MS_NODEV). NoDev :: MountFlag -- | Disallow program execution (MS_NOEXEC). NoExec :: MountFlag -- | Writes are synced at once (MS_SYNCHRONOUS). Synchronous :: MountFlag -- | Allow mandatory locks on a filesystem (MS_MANDLOCK). MandLock :: MountFlag -- | Directory modifications are synchronous (MS_DIRSYNC). DirSync :: MountFlag -- | Do not update access times (MS_NOATIME). NoATime :: MountFlag -- | Do not update directory access times (MS_NODIRATIME). NoDirATime :: MountFlag -- | Silent mount (MS_SILENT). Silent :: MountFlag -- | VFS does not apply the umask (MS_POSIXACL). PosixACL :: MountFlag -- | Update atime relative to mtime/ctime (MS_RELATIME). RelATime :: MountFlag -- | Update inode I_version field (MS_I_VERSION). IVersion :: MountFlag -- | Always perform atime updates (MS_STRICTATIME). StrictATime :: MountFlag -- | Filesystem dependent options to be used when mounting a filesystem; -- the content of DriverData is passed directly to the -- filesystem driver. type DriverData = ByteString -- | Empty DriverData. noData :: DriverData -- | Mount an already mounted filesystem under a new directory (call to -- mount() with MS_BIND). bind :: FilePath -> FilePath -> IO () -- | Mount an already mounted filesystem and all its submounts under a new -- directory (call to mount() with MS_BIND and -- MS_REC). rBind :: FilePath -> FilePath -> IO () -- | Alter flags of a bound filesystem (call to mount() -- with MS_REMOUNT and MS_BIND). rebind :: FilePath -> [MountFlag] -> IO () -- | Set the MS_SHARED propagation flag on a mounted filesystem. makeShared :: FilePath -> IO () -- | Set the MS_SHARED propagation flag on a mounted filesystem -- and recursively on all submounts. makeRShared :: FilePath -> IO () -- | Set the MS_SLAVE propagation flag on a mounted filesystem. makeSlave :: FilePath -> IO () -- | Set the MS_SLAVE propagation flag on a mounted filesystem -- recursively on all submounts. makeRSlave :: FilePath -> IO () -- | Set the MS_PRIVATE propagation flag on a mounted filesystem. makePrivate :: FilePath -> IO () -- | Set the MS_PRIVATE propagation flag on a mounted filesystem -- and recursively on all submounts. makeRPrivate :: FilePath -> IO () -- | Set the MS_UNBINDABLE propagation flag on a mounted -- filesystem. makeUnbindable :: FilePath -> IO () -- | Set the MS_UNBINDABLE propagation flag on a mounted -- filesystem and recursively on all submounts. makeRUnbindable :: FilePath -> IO () -- | Atomically move a mounted filesystem to another mount point (call to -- mount() with MS_MOVE). move :: FilePath -> FilePath -> IO () -- | Unmount a filesystem (call to umount()). umount :: FilePath -> IO () -- | Unmount a filesystem using specific unmount options (call to -- umount2()). See UmountFlag for -- details. umountWith :: UmountFlag -> SymLink -> FilePath -> IO () -- | A filesystem independent option to be used when unmounting a -- filesystem. data UmountFlag -- | Plain unmount, behaves like umount. Plain :: UmountFlag -- | Force unmount even if busy. Force :: UmountFlag -- | 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. Detach :: UmountFlag -- | 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. Expire :: UmountFlag -- | Whether to follow symbolic links on umount. data SymLink Follow :: SymLink NoFollow :: SymLink instance [safe] Eq MountFlag instance [safe] Read MountFlag instance [safe] Show MountFlag instance [safe] Eq UmountFlag instance [safe] Read UmountFlag instance [safe] Show UmountFlag instance [safe] Eq SymLink instance [safe] Read SymLink instance [safe] Show SymLink