filesystem-conduit 0.0.1 → 0.2.0
raw patch · 2 files changed
+12/−7 lines, 2 filesdep ~conduitPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: conduit
API changes (from Hackage documentation)
Files
- Data/Conduit/Filesystem.hs +10/−5
- filesystem-conduit.cabal +2/−2
Data/Conduit/Filesystem.hs view
@@ -42,15 +42,20 @@ => Bool -- ^ Follow directory symlinks (only used on POSIX platforms) -> FilePath -- ^ Root directory -> C.Source m FilePath-traverse followSymlinks root = C.Source $ do- seq0 <- liftIO $ listDirectory root- C.prepareSource $ C.sourceState seq0 pull+traverse followSymlinks root = C.Source+ { C.sourcePull = do+ seq0 <- liftIO $ listDirectory root+ pull seq0+ , C.sourceClose = return ()+ } where- pull [] = return ([], C.Closed)+ mkSrc ps = C.Source (pull ps) (return ())++ pull [] = return C.Closed pull (p:ps) = do isFile' <- liftIO $ isFile p if isFile'- then return (ps, C.Open p)+ then return $ C.Open (mkSrc ps) p else do follow' <- liftIO $ follow p if follow'
filesystem-conduit.cabal view
@@ -1,5 +1,5 @@ Name: filesystem-conduit-Version: 0.0.1+Version: 0.2.0 Synopsis: Use system-filepath data types with conduits. Description: Provides ability to traverse a folder structure efficiently, as well as convenience wrappers for reading from and writing to files. License: BSD3@@ -21,7 +21,7 @@ , system-filepath >= 0.4.3 && < 0.5 , bytestring >= 0.9 , text >= 0.11- , conduit+ , conduit >= 0.2 ghc-options: -Wall if os(windows)