Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
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
.
Instances
Show FileLockingNotSupported Source # | |
Defined in Lukko.Internal.Types showsPrec :: Int -> FileLockingNotSupported -> ShowS # show :: FileLockingNotSupported -> String # showList :: [FileLockingNotSupported] -> ShowS # | |
Exception FileLockingNotSupported Source # | |
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.
MethodOFD | open file descriptor locking |
MethodFLock | BSD |
MethodWindows | Windows locking |
MethodNoOp | No-Op (throws |
Instances
fileLockingMethod :: FileLockingMethod Source #
A constant specifying this method