| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
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
- data HandleOS osHandle = HandleOS {}
- isOpenHandleOS :: HandleOS osHandle -> IO Bool
- closeHandleOS :: HandleOS osHandle -> (osHandle -> IO ()) -> IO ()
- withOpenHandle :: String -> HandleOS osHandle -> (osHandle -> IO a) -> IO a
- isHandleClosedException :: IOException -> Bool
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.
closeHandleOS :: HandleOS osHandle -> (osHandle -> IO ()) -> IO () Source #
This is a no-op when the handle is already closed.