ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Storage.FS.Handle

Description

This is meant to be used for the implementation of HasFS instances and not directly by client code.

Synopsis

Documentation

data HandleOS osHandle Source #

File handlers for the IO instance for HasFS. This is parametric on the os.

The FilePath is used to improve error messages. The MVar is used to implement close. osHandle is Fd for unix and HANDLE for Windows.

Constructors

HandleOS 

Fields

Instances

Instances details
Eq (HandleOS a) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.FS.Handle

Methods

(==)HandleOS a → HandleOS a → Bool Source #

(/=)HandleOS a → HandleOS a → Bool Source #

Show (HandleOS a) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.FS.Handle

closeHandleOSHandleOS osHandle → (osHandle → IO ()) → IO () Source #

This is a no-op when the handle is already closed.

withOpenHandleStringHandleOS osHandle → (osHandle → IO a) → IO a Source #

This is meant to be used for the implementation of individual file system commands. Using it for larger scopes woud not be correct, since we would not notice if the handle is closed.