module System.Path.IO
(
withFile,
openFile,
readFile,
writeFile,
appendFile,
withBinaryFile,
openBinaryFile,
openTempFile,
openBinaryTempFile,
IO,
SIO.fixIO,
Handle,
SIO.stdin,
SIO.stdout,
SIO.stderr,
SIO.IOMode(..),
SIO.hClose,
SIO.hFileSize,
SIO.hSetFileSize,
SIO.hIsEOF,
SIO.isEOF,
SIO.BufferMode(..),
SIO.hSetBuffering,
SIO.hGetBuffering,
SIO.hFlush,
SIO.hGetPosn,
SIO.hSetPosn,
SIO.HandlePosn,
SIO.hSeek,
SIO.SeekMode(..),
SIO.hTell,
SIO.hIsOpen,
SIO.hIsClosed,
SIO.hIsReadable,
SIO.hIsWritable,
SIO.hIsSeekable,
SIO.hIsTerminalDevice,
SIO.hSetEcho,
SIO.hGetEcho,
SIO.hShow,
SIO.hWaitForInput,
SIO.hReady,
SIO.hGetChar,
SIO.hGetLine,
SIO.hLookAhead,
SIO.hGetContents,
SIO.hPutChar,
SIO.hPutStr,
SIO.hPutStrLn,
SIO.hPrint,
interact,
putChar,
putStr,
putStrLn,
print,
getChar,
getLine,
getContents,
readIO,
readLn,
SIO.hSetBinaryMode,
SIO.hPutBuf,
SIO.hGetBuf,
SIO.hPutBufNonBlocking,
SIO.hGetBufNonBlocking
)
where
import System.Path
import qualified System.IO as SIO
import System.IO (IOMode, Handle)
import Control.Arrow (first)
import Control.Applicative ((<$>))
import Prelude hiding (FilePath, readFile, writeFile, appendFile)
withFile :: AbsRelClass ar => FilePath ar -> IOMode -> (Handle -> IO r) -> IO r
withFile f = SIO.withFile (getPathString f)
openFile :: AbsRelClass ar => FilePath ar -> IOMode -> IO Handle
openFile f = SIO.openFile (getPathString f)
readFile :: AbsRelClass ar => FilePath ar -> IO String
readFile f = SIO.readFile (getPathString f)
writeFile :: AbsRelClass ar => FilePath ar -> String -> IO ()
writeFile f = SIO.writeFile (getPathString f)
appendFile :: AbsRelClass ar => FilePath ar -> String -> IO ()
appendFile f = SIO.appendFile (getPathString f)
withBinaryFile :: AbsRelClass ar => FilePath ar -> IOMode -> (Handle -> IO r) -> IO r
withBinaryFile f = SIO.withBinaryFile (getPathString f)
openBinaryFile :: AbsRelClass ar => FilePath ar -> IOMode -> IO Handle
openBinaryFile f = SIO.openBinaryFile (getPathString f)
openTempFile :: AbsRelClass ar => DirPath ar -> RelFile -> IO (AbsFile, Handle)
openTempFile f template = first asAbsFile <$> SIO.openTempFile (getPathString f) (getPathString template)
openBinaryTempFile :: AbsRelClass ar => DirPath ar -> RelFile -> IO (AbsFile, Handle)
openBinaryTempFile f template = first asAbsFile <$> SIO.openBinaryTempFile (getPathString f) (getPathString template)