Redo file reading API

This commit is contained in:
2020-01-13 23:13:21 +01:00
parent 6a1f80bc17
commit 9b20ce2e72
5 changed files with 85 additions and 133 deletions

View File

@@ -27,7 +27,6 @@ import Data.IORef
, IORef
)
import HPath.IO
import HPath.IO.Errors
import Prelude hiding (appendFile, readFile, writeFile)
import Data.Maybe
(
@@ -281,10 +280,5 @@ allDirectoryContents' ip =
readFile' :: ByteString -> IO ByteString
{-# NOINLINE readFile' #-}
readFile' p = withTmpDir p readFile
readFileEOF' :: ByteString -> IO L.ByteString
{-# NOINLINE readFileEOF' #-}
readFileEOF' p = withTmpDir p readFileEOF
readFile' p = withTmpDir p (fmap L.toStrict . readFile)