Idris2Doc : System.File.Handle

System.File.Handle

Reexports

import public System.File.Error
import public System.File.Mode
import public System.File.Types

Definitions

openFile : HasIO io => String -> Mode -> io (Either FileError File)
  Open the given file name with the specified mode.

@ f the file name to open
@ m the mode to open the file with

Totality: total
Visibility: export
closeFile : HasIO io => File -> io ()
  Close the given file handle.

@ fh the file handle to close

Totality: total
Visibility: export
withFile : HasIO io => String -> Mode -> (FileError -> io a) -> (File -> io (Either a b)) -> io (Either a b)
  Perform a given operation on successful file open
and ensure the file is closed afterwards or perform
a different operation if the file fails to open.

Totality: total
Visibility: export