| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Lukko.FLock
Contents
Description
File locking via POSIX flock.
Synopsis
- data FileLockingNotSupported = FileLockingNotSupported
- fileLockingSupported :: Bool
- type FileLockingSupported = True
- data FileLockingMethod
- fileLockingMethod :: FileLockingMethod
- data LockMode
- data FD
- fdOpen :: FilePath -> IO FD
- fdClose :: FD -> IO ()
- fdLock :: FD -> LockMode -> IO ()
- fdTryLock :: FD -> LockMode -> IO Bool
- fdUnlock :: FD -> IO ()
- hLock :: Handle -> LockMode -> IO ()
- hTryLock :: Handle -> LockMode -> IO Bool
- hUnlock :: Handle -> IO ()
Types
data FileLockingNotSupported Source #
Exception thrown by hLock on non-Windows platforms that don't support
flock.
Constructors
| FileLockingNotSupported |
Instances
| Show FileLockingNotSupported Source # | |
Defined in Lukko.Internal.Types Methods showsPrec :: Int -> FileLockingNotSupported -> ShowS # show :: FileLockingNotSupported -> String # showList :: [FileLockingNotSupported] -> ShowS # | |
| Exception FileLockingNotSupported Source # | |
Defined in Lukko.Internal.Types | |
fileLockingSupported :: Bool Source #
A constants specifying whether file locking is supported.
type FileLockingSupported = True Source #
A type level fileLockingSupported.
data FileLockingMethod Source #
Potentially availble lock methods.
Constructors
| MethodOFD | open file descriptor locking |
| MethodFLock | BSD |
| MethodWindows | Windows locking |
| MethodNoOp | No-Op (throws |
Instances
fileLockingMethod :: FileLockingMethod Source #
A constant specifying this method
Indicates a mode in which a file should be locked.
Constructors
| SharedLock | |
| ExclusiveLock |