Safe Haskell | None |
---|---|
Language | GHC2021 |
FileSystem.IO
Contents
Description
Provides common file IO actions in terms of OsPath
.
Since: 0.1
Synopsis
- readBinaryFileIO :: OsPath -> IO ByteString
- writeBinaryFileIO :: OsPath -> ByteString -> IO ()
- appendBinaryFileIO :: OsPath -> ByteString -> IO ()
- openBinaryFileIO :: OsPath -> IOMode -> IO Handle
- withBinaryFileIO :: OsPath -> IOMode -> (Handle -> IO a) -> IO a
- throwPathIOError :: (HasCallStack, MonadThrow m) => OsPath -> String -> IOErrorType -> String -> m a
- throwFilePathIOError :: (HasCallStack, MonadThrow m) => FilePath -> String -> IOErrorType -> String -> m a
File handling
readBinaryFileIO :: OsPath -> IO ByteString Source #
Since: 0.1
writeBinaryFileIO :: OsPath -> ByteString -> IO () Source #
Since: 0.1
appendBinaryFileIO :: OsPath -> ByteString -> IO () Source #
Since: 0.1
Errors
Arguments
:: (HasCallStack, MonadThrow m) | |
=> OsPath | Path upon which the IO operation failed. |
-> String | String location (e.g. function name). |
-> IOErrorType | Type of exception. |
-> String | Description. |
-> m a |
Helper for throwing IOException
.
Since: 0.1
Arguments
:: (HasCallStack, MonadThrow m) | |
=> FilePath | Path upon which the IO operation failed. |
-> String | String location (e.g. function name). |
-> IOErrorType | Type of exception. |
-> String | Description. |
-> m a |
Helper for throwing IOException
with legacy FilePath.
Since: 0.1