rawfilepath-0.2.3: Use RawFilePath instead of FilePath

Copyright(c) XT 2016
LicenseApache 2.0
Maintainere@xtendo.org
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Data.ByteString.RawFilePath

Description

A drop-in replacement of Data.ByteString from the bytestring package that provides file I/O functions with RawFilePath instead of FilePath.

Synopsis

Documentation

type RawFilePath = ByteString #

A literal POSIX file path

readFile :: RawFilePath -> IO ByteString Source #

Read an entire file at the RawFilePath strictly into a ByteString.

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

Write a ByteString to a file at the RawFilePath.

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

Append a ByteString to a file at the RawFilePath.

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

Acquire a file handle and perform an I/O action. The file will be closed on exit or when this I/O action throws an exception.