packages feed

hpath-io 0.14.0 → 0.14.1

raw patch · 3 files changed

+21/−2 lines, 3 filesdep ~hpath-directoryPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: hpath-directory

API changes (from Hackage documentation)

+ HPath.IO: readFileStrict :: Path b -> IO ByteString

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for hpath-io +## 0.14.1 -- ????-??-??++- add `readFileStrict`+ ## 0.14.0 -- 2020-07-04  * Use hpath-directory-0.14.0
hpath-io.cabal view
@@ -1,5 +1,5 @@ name:                hpath-io-version:             0.14.0+version:             0.14.1 synopsis:            High-level IO operations on files/directories description:         High-level IO operations on files/directories, utilizing type-safe Paths -- bug-reports:@@ -29,7 +29,7 @@                    , bytestring >= 0.10.0.0                    , exceptions                    , hpath >= 0.11 && < 0.12-                   , hpath-directory >= 0.14 && < 0.15+                   , hpath-directory >= 0.14.1 && < 0.15                    , hpath-posix     >= 0.13 && < 0.14                    , safe-exceptions >= 0.1                    , streamly >= 0.7
src/HPath/IO.hs view
@@ -60,6 +60,7 @@   , moveFile   -- * File reading   , readFile+  , readFileStrict   , readFileStream   -- * File writing   , writeFile@@ -104,6 +105,7 @@ import           Control.Monad.Catch            ( MonadThrow(..) )  import           Data.ByteString                ( ByteString )+import qualified Data.ByteString               as BS import           Data.Traversable               ( for ) import qualified Data.ByteString.Lazy          as L import           Data.Time.Clock@@ -560,6 +562,19 @@ readFile :: Path b -> IO L.ByteString readFile (Path path) = RD.readFile path ++-- |Read the given file strictly into memory.+--+-- Symbolic links are followed. File must exist.+--+-- Throws:+--+--     - `InappropriateType` if file is not a regular file or a symlink+--     - `PermissionDenied` if we cannot read the file or the directory+--        containting it+--     - `NoSuchThing` if the file does not exist+readFileStrict :: Path b -> IO BS.ByteString+readFileStrict (Path path) = RD.readFileStrict path   -- | Open the given file as a filestream. Once the filestream is