lukko-0.1.1.3: File locking
Safe HaskellSafe
LanguageHaskell2010

Lukko.NoOp

Description

Non-operating locks.

All functions throw FileLockingNotImplemented.

Synopsis

Types

fileLockingSupported :: Bool Source #

A constants specifying whether file locking is supported.

data FileLockingMethod Source #

Potentially availble lock methods.

Constructors

MethodOFD

open file descriptor locking

MethodFLock

BSD flock

MethodWindows

Windows locking

MethodNoOp

No-Op (throws FileLockingNotSupported)

Instances

Instances details
Bounded FileLockingMethod Source # 
Instance details

Defined in Lukko.Internal.Types

Enum FileLockingMethod Source # 
Instance details

Defined in Lukko.Internal.Types

Eq FileLockingMethod Source # 
Instance details

Defined in Lukko.Internal.Types

Ord FileLockingMethod Source # 
Instance details

Defined in Lukko.Internal.Types

Show FileLockingMethod Source # 
Instance details

Defined in Lukko.Internal.Types

fileLockingMethod :: FileLockingMethod Source #

A constant specifying this method

data LockMode Source #

Indicates a mode in which a file should be locked.

Constructors

SharedLock 
ExclusiveLock 

File descriptors

data FD Source #

Opaque file descriptor

This is a wrapper over CInt

fdOpen :: FilePath -> IO FD Source #

Open file to be used for locking.

open(path, O_RDWR | O_CREAT);

fdClose :: FD -> IO () Source #

Close lock file.

close(fd);

fdLock :: FD -> LockMode -> IO () Source #

No-op implementation.

fdTryLock :: FD -> LockMode -> IO Bool Source #

No-op implementation

fdUnlock :: FD -> IO () Source #

No-op implementation.

Handles

hLock :: Handle -> LockMode -> IO () Source #

No-op implementation.

hTryLock :: Handle -> LockMode -> IO Bool Source #

No-op implementation

hUnlock :: Handle -> IO () Source #

No-op implementation.