Files
postgrest/docs/Files.md
T
2016-12-10 14:51:33 +00:00

772 B

Files

Basic IO

readFile

readFile :: FilePath -> IO Text

writeFile

writeFile :: FilePath -> Text -> IO ()

appendFile

appendFile :: FilePath -> Text -> IO ()

Console

getLine

getLine :: IO Text

getContents

getContents :: IO Text

interact

interact :: (Text -> Text) -> IO ()

File Handles

data IOMode 
  = ReadMode
  | WriteMode
  | AppendMode
  | ReadWriteMode

openFile

openFile :: FilePath -> IOMode -> IO Handle

withFile

withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r

stdin

stdout

stderr

Handle

FilePath