fs-api-0.3.0.1: Abstract interface for the file system
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.FS.IO.Handle

Description

This module is mainly meant to be used for the IO implementation of HasFS.

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
Show (HandleOS a) Source # 
Instance details

Defined in System.FS.IO.Handle

Methods

showsPrecIntHandleOS a → ShowS #

showHandleOS a → String #

showList ∷ [HandleOS a] → ShowS #

Eq (HandleOS a) Source # 
Instance details

Defined in System.FS.IO.Handle

Methods

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

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

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.