extra-0.3.2: Extra functions I use.

Safe HaskellNone

System.IO.Extra

Description

More advanced temporary file manipulation functions can be found in the exceptions package.

Synopsis

Documentation

readFileEncoding :: TextEncoding -> FilePath -> IO StringSource

readFileUTF8 :: FilePath -> IO StringSource

readFileBinary :: FilePath -> IO StringSource

readFile' :: FilePath -> IO StringSource

readFileEncoding' :: TextEncoding -> FilePath -> IO StringSource

readFileUTF8' :: FilePath -> IO StringSource

readFileBinary' :: FilePath -> IO StringSource

writeFileEncoding :: TextEncoding -> FilePath -> String -> IO ()Source

writeFileUTF8 :: FilePath -> String -> IO ()Source

writeFileBinary :: FilePath -> String -> IO ()Source

withTempFile :: (FilePath -> IO a) -> IO aSource

withTempDir :: (FilePath -> IO a) -> IO aSource

newTempFile :: (IO FilePath, FilePath -> IO ())Source

newTempDir :: (IO FilePath, FilePath -> IO ())Source

captureOutput :: IO a -> IO (String, a)Source

Capture the stdout and stderr of a computation.

 captureOutput (print 1) == return ("1\n",())

withBuffering :: Handle -> BufferMode -> IO a -> IO aSource