@@ -26,7 +26,9 @@ module Streamly.Internal.FileSystem.Dir
26 -- , readWithBufferOf
26 -- , readWithBufferOf
28 , toStream
28 , toStream
29− , toStreamEither
29+ , toEither
31 , toStreamWithBufferOf
33 , toStreamWithBufferOf
@@ -277,10 +279,26 @@ toStream = S.unfold read
277-- entries.
279-- entries.
279-- /Internal/
281-- /Internal/
280−{-# INLINE toStreamEither #-}
282+{-# INLINE toEither #-}
281−toStreamEither :: (IsStream t, MonadIO m)
283+toEither :: (IsStream t, MonadIO m)
282 => String -> t m (Either String String)
284 => String -> t m (Either String String)
283−toStreamEither = S.unfold readEither
285+toEither = S.unfold readEither
287+-- | Read files only.
291+{-# INLINE toFiles #-}
292+toFiles :: (IsStream t, MonadIO m) => String -> t m String
293+toFiles = S.unfold readFiles
295+-- | Read directories only.
299+{-# INLINE toDirs #-}
300+toDirs :: (IsStream t, MonadIO m) => String -> t m String
301+toDirs = S.unfold readDirs
286-------------------------------------------------------------------------------
304-------------------------------------------------------------------------------