System.File.PlatformPath

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

Copyright | (c) Julian Ospald 2023-2024
License | BSD3
Maintainer | hasufell@posteo.de
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

System.File.PlatformPath

Description

This module is only interesting when you are implementing low-level libraries based on `OsPath` API.

Usually you want System.File.OsPath.

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

# 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`.