packages feed

hpath-io 0.13.2 → 0.14.0

raw patch · 3 files changed

+13/−22 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: readFileStream :: Path b -> IO (SerialT IO ByteString)
+ HPath.IO: readFileStream :: Path b -> IO (SerialT IO (Array Word8))

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for hpath-io +## 0.14.0 -- 2020-07-04++* Use hpath-directory-0.14.0+ ## 0.13.2 -- 2020-05-08  * Add getDirsFilesStream and use streamly-posix for dircontents (#34)
hpath-io.cabal view
@@ -1,5 +1,5 @@ name:                hpath-io-version:             0.13.2+version:             0.14.0 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.13 && < 0.14+                   , hpath-directory >= 0.14 && < 0.15                    , hpath-posix     >= 0.13 && < 0.14                    , safe-exceptions >= 0.1                    , streamly >= 0.7
src/HPath/IO.hs view
@@ -108,12 +108,14 @@ import qualified Data.ByteString.Lazy          as L import           Data.Time.Clock import           Data.Time.Clock.POSIX          ( POSIXTime )+import           Data.Word                      ( Word8 ) import           HPath import           Prelude                 hiding ( appendFile                                                 , readFile                                                 , writeFile                                                 ) import           Streamly+import           Streamly.Memory.Array import qualified System.IO                     as SIO import           System.Posix.Directory.ByteString                                                 ( getWorkingDirectory )@@ -193,8 +195,6 @@ -- Throws in `Strict` CopyMode only: -- --    - `AlreadyExists` if destination already exists------ Note: may call `getcwd` (only if destination is a relative path) copyDirRecursive :: Path b1  -- ^ source dir                  -> Path b2  -- ^ destination (parent dirs                              --   are not automatically created)@@ -233,7 +233,6 @@ -- Notes: -- --    - calls `symlink`---    - calls `getcwd` in Overwrite mode (if destination is a relative path) recreateSymlink :: Path b1   -- ^ the old symlink file                 -> Path b2   -- ^ destination file                 -> CopyMode@@ -276,10 +275,6 @@ -- Throws in `Strict` mode only: -- --    - `AlreadyExists` if destination already exists------ Notes:------    - may call `getcwd` in Overwrite mode (if destination is a relative path) copyFile :: Path b1   -- ^ source file          -> Path b2   -- ^ destination file          -> CopyMode@@ -294,8 +289,6 @@ -- --    * examines filetypes explicitly --    * calls `copyDirRecursive` for directories------ Note: may call `getcwd` in Overwrite mode (if destination is a relative path) easyCopy :: Path b1 -> Path b2 -> CopyMode -> RecursiveErrorMode -> IO () easyCopy (Path from) (Path to) cm rm = RD.easyCopy from to cm rm @@ -317,6 +310,8 @@ --    - `InappropriateType` for wrong file type (directory) --    - `NoSuchThing` if the file does not exist --    - `PermissionDenied` if the directory cannot be read+--+-- Notes: calls `unlink` deleteFile :: Path b -> IO () deleteFile (Path p) = RD.deleteFile p @@ -453,8 +448,6 @@ --      exist and cannot be written to --    - `AlreadyExists` if destination already exists and --      is *not* a directory------ Note: calls `getcwd` if the input path is a relative path createDirRecursive :: FileMode -> Path b -> IO () createDirRecursive fm (Path p) = RD.createDirRecursive fm p @@ -539,7 +532,6 @@ -- Notes: -- --    - calls `rename` (but does not allow to rename over existing files)---    - calls `getcwd` in Overwrite mode if destination is a relative path moveFile :: Path b1   -- ^ file to move          -> Path b2   -- ^ destination          -> CopyMode@@ -555,14 +547,9 @@     --------------------  --- |Read the given file *at once* into memory as a lazy ByteString.--- Symbolic links are followed, no sanity checks on file size--- or file type. File must exist. Uses Builders under the hood--- (hence lazy ByteString).------ Safety/reliability concerns:+-- |Read the given file lazily. -----    * the whole file is read into memory, this doesn't read lazily+-- Symbolic links are followed. File must exist. -- -- Throws: --@@ -584,7 +571,7 @@ --     - `PermissionDenied` if we cannot read the file or the directory --        containting it --     - `NoSuchThing` if the file does not exist-readFileStream :: Path b -> IO (SerialT IO ByteString)+readFileStream :: Path b -> IO (SerialT IO (Array Word8)) readFileStream (Path fp) = RD.readFileStream fp