System.File.PlatformPath.Internal

file-io-0.1.5: Basic file IO operations via 'OsPath'

Safe Haskell | None
Language | Haskell2010

System.File.PlatformPath.Internal

Synopsis

- openBinaryFile :: PlatformPath -> IOMode -> IO Handle
- withFile :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r
- withBinaryFile :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r
- withFile' :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r
- withBinaryFile' :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r
- readFile :: PlatformPath -> IO ByteString
- readFile' :: PlatformPath -> IO ByteString
- writeFile :: PlatformPath -> ByteString -> IO ()
- writeFile' :: PlatformPath -> ByteString -> IO ()
- appendFile :: PlatformPath -> ByteString -> IO ()
- appendFile' :: PlatformPath -> ByteString -> IO ()
- openFile :: PlatformPath -> IOMode -> IO Handle
- openExistingFile :: PlatformPath -> IOMode -> IO Handle
- openFileWithCloseOnExec :: PlatformPath -> IOMode -> IO Handle
- openExistingFileWithCloseOnExec :: PlatformPath -> IOMode -> IO Handle
- handleFinalizer :: FilePath -> MVar Handle__ -> IO ()
- type HandleFinalizer = FilePath -> MVar Handle__ -> IO ()
- addHandleFinalizer :: Handle -> HandleFinalizer -> IO ()
- withOpenFile' :: PlatformPath -> IOMode -> Bool -> Bool -> Bool -> (Handle -> IO r) -> Bool -> IO r
- addFilePathToIOError :: String -> PlatformPath -> IOException -> IOException
- augmentError :: String -> PlatformPath -> IO a -> IO a

# Documentation

openBinaryFile :: PlatformPath -> IOMode -> IO Handle #

Like `openBinaryFile`, but takes a `PlatformPath` instead of an `OsPath`.

withFile :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r #

Like `withFile`, but takes a `PlatformPath` instead of an `OsPath`.

withBinaryFile :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r #

Like `withBinaryFile`, but takes a `PlatformPath` instead of an `OsPath`.

withFile' :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r #

Like `withFile'`, but takes a `PlatformPath` instead of an `OsPath`.

withBinaryFile' :: PlatformPath -> IOMode -> (Handle -> IO r) -> IO r #

Like `withBinaryFile'`, but takes a `PlatformPath` instead of an `OsPath`.

readFile :: PlatformPath -> IO ByteString #

Like `readFile`, but takes a `PlatformPath` instead of an `OsPath`.

readFile' :: PlatformPath -> IO ByteString #

Like `readFile'`, but takes a `PlatformPath` instead of an `OsPath`.

writeFile :: PlatformPath -> ByteString -> IO () #

Like `writeFile`, but takes a `PlatformPath` instead of an `OsPath`.

writeFile' :: PlatformPath -> ByteString -> IO () #

Like `writeFile'`, but takes a `PlatformPath` instead of an `OsPath`.

appendFile :: PlatformPath -> ByteString -> IO () #

Like `appendFile`, but takes a `PlatformPath` instead of an `OsPath`.

appendFile' :: PlatformPath -> ByteString -> IO () #

Like `appendFile'`, but takes a `PlatformPath` instead of an `OsPath`.

openFile :: PlatformPath -> IOMode -> IO Handle #

Like `openFile`, but takes a `PlatformPath` instead of an `OsPath`.

openExistingFile :: PlatformPath -> IOMode -> IO Handle #

Like `openExistingFile`, but takes a `PlatformPath` instead of an `OsPath`.

openFileWithCloseOnExec :: PlatformPath -> IOMode -> IO Handle #

Open a file and return the `Handle`.

Sets `O_CLOEXEC` on posix.

Since: 0.1.2

openExistingFileWithCloseOnExec :: PlatformPath -> IOMode -> IO Handle #

Open an existing file and return the `Handle`.

Sets `O_CLOEXEC` on posix.

Since: 0.1.2

handleFinalizer :: FilePath -> MVar Handle__ -> IO () #

type HandleFinalizer = FilePath -> MVar Handle__ -> IO () #

addHandleFinalizer :: Handle -> HandleFinalizer -> IO () #

Add a finalizer to a `Handle`. Specifically, the finalizer will be added to the `MVar` of a file handle or the write-side `MVar` of a duplex handle. See Handle Finalizers for details.

withOpenFile' :: PlatformPath -> IOMode -> Bool -> Bool -> Bool -> (Handle -> IO r) -> Bool -> IO r #

addFilePathToIOError :: String -> PlatformPath -> IOException -> IOException #

augmentError :: String -> PlatformPath -> IO a -> IO a #