Safe Haskell | None |
---|
More advanced temporary file manipulation functions can be found in the exceptions
package.
- readFileEncoding :: TextEncoding -> FilePath -> IO String
- readFileUTF8 :: FilePath -> IO String
- readFileBinary :: FilePath -> IO String
- readFile' :: FilePath -> IO String
- readFileEncoding' :: TextEncoding -> FilePath -> IO String
- readFileUTF8' :: FilePath -> IO String
- readFileBinary' :: FilePath -> IO String
- writeFileEncoding :: TextEncoding -> FilePath -> String -> IO ()
- writeFileUTF8 :: FilePath -> String -> IO ()
- writeFileBinary :: FilePath -> String -> IO ()
- withTempFile :: (FilePath -> IO a) -> IO a
- withTempDir :: (FilePath -> IO a) -> IO a
- newTempFile :: (IO FilePath, FilePath -> IO ())
- newTempDir :: (IO FilePath, FilePath -> IO ())
- captureOutput :: IO a -> IO (String, a)
- withBuffering :: Handle -> BufferMode -> IO a -> IO a
Documentation
readFileEncoding :: TextEncoding -> FilePath -> IO StringSource
readFileUTF8 :: FilePath -> IO StringSource
readFileBinary :: 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