packages feed

hpath-io 0.13.1 → 0.13.2

raw patch · 3 files changed

+20/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ HPath.IO: getDirsFilesStream :: (MonadCatch m, MonadAsync m, MonadMask m) => Path b -> IO (SerialT m (Path Rel))

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for hpath-io +## 0.13.2 -- 2020-05-08++* Add getDirsFilesStream and use streamly-posix for dircontents (#34)+ ## 0.13.0 -- 2020-01-26  * switch to using 'hpath-bytestring' for the implementation (this is now just a wrapper module, mostly)
hpath-io.cabal view
@@ -1,5 +1,5 @@ name:                hpath-io-version:             0.13.1+version:             0.13.2 synopsis:            High-level IO operations on files/directories description:         High-level IO operations on files/directories, utilizing type-safe Paths -- bug-reports:
src/HPath/IO.hs view
@@ -27,7 +27,8 @@ -- For other functions (like `copyFile`), the behavior on these file types is -- unreliable/unsafe. Check the documentation of those functions for details. -{-# LANGUAGE PackageImports #-}+{-# LANGUAGE FlexibleContexts #-} -- streamly+{-# LANGUAGE PackageImports   #-}  module HPath.IO   (@@ -82,6 +83,7 @@   -- * Directory reading   , getDirsFiles   , getDirsFiles'+  , getDirsFilesStream   -- * Filetype operations   , getFileType   -- * Others@@ -94,7 +96,9 @@ where  -import           Control.Exception.Safe         ( bracketOnError+import           Control.Exception.Safe         ( MonadMask+                                                , MonadCatch+                                                , bracketOnError                                                 , finally                                                 ) import           Control.Monad.Catch            ( MonadThrow(..) )@@ -759,6 +763,15 @@ getDirsFiles' (Path fp) = do   rawContents <- RD.getDirsFiles' fp   for rawContents $ \r -> parseRel r+++-- | Like 'getDirsFiles'', except returning a Stream.+getDirsFilesStream :: (MonadCatch m, MonadAsync m, MonadMask m)+                   => Path b+                   -> IO (SerialT m (Path Rel))+getDirsFilesStream (Path fp) = do+  s <- RD.getDirsFilesStream fp+  pure (s >>= parseRel)