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 Source #

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

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

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

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

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

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

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

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

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

readFile :: PlatformPath -> IO ByteString Source #

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

readFile' :: PlatformPath -> IO ByteString Source #

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Open a file and return the `Handle`.

Sets `O_CLOEXEC` on posix.

Since: 0.1.2

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

Open an existing file and return the `Handle`.

Sets `O_CLOEXEC` on posix.

Since: 0.1.2

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

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

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

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 Source #

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

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