System.IO

The IO monad

data IO a

fixIO

Files and handles

type FilePath

data Handle

Standard handles

stdin

stdout

stderr

Opening and closing files

Opening files

withFile

openFile

data IOMode

Closing files

hClose

Special cases

readFile

writeFile

appendFile

File locking

Operations on handles

Determining and changing the size of a file

hFileSize

hSetFileSize

Detecting the end of input

hIsEOF

isEOF

Buffering operations

data BufferMode

hSetBuffering

hGetBuffering

hFlush

Repositioning handles

hGetPosn

hSetPosn

data HandlePosn

hSeek

data SeekMode

hTell

Handle properties

hIsOpen

hIsClosed

hIsReadable

hIsWritable

hIsSeekable

Terminal operations

hIsTerminalDevice

hSetEcho

hGetEcho

Showing handle state

hShow

Text input and output

Text input

hWaitForInput

hReady

hGetChar

hGetLine

hLookAhead

hGetContents

Text output

hPutChar

hPutStr

hPutStrLn

hPrint

Special cases for standard input and output

interact

putChar

putStr

putStrLn

print

getChar

getLine

getContents

readIO

readLn