Skip to content

Commit 77814b6

Browse files
committed
Use ReadOptions and options config in all the Posix APIs
- Use dummy ReadOptions in Windows - Use hsc constructs directly instead of using C FFI - Update the tests and benchmarks - Add symlink related tests
1 parent 5f64213 commit 77814b6

File tree

12 files changed

+531
-250
lines changed

12 files changed

+531
-250
lines changed

bench-test-lib/src/BenchTestLib/DirIO.hs

Lines changed: 146 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -91,31 +91,43 @@ mergeIterateWith nxt f =
9191
. StreamK.mergeIterateWith f (StreamK.fromStream . nxt)
9292
. StreamK.fromStream
9393

94-
streamDir :: Either Path b -> Stream IO (Either Path Path)
95-
streamDir = either Dir.readEitherPaths (const Stream.nil)
94+
streamDir
95+
:: (Dir.ReadOptions -> Dir.ReadOptions)
96+
-> Either Path b -> Stream IO (Either Path Path)
97+
streamDir f = either (Dir.readEitherPaths f) (const Stream.nil)
9698

97-
unfoldDir :: Unfold IO (Either Path b) (Either Path Path)
98-
unfoldDir = Unfold.either Dir.eitherReaderPaths Unfold.nil
99+
unfoldDir
100+
:: (Dir.ReadOptions -> Dir.ReadOptions)
101+
-> Unfold IO (Either Path b) (Either Path Path)
102+
unfoldDir f = Unfold.either (Dir.eitherReaderPaths f) Unfold.nil
99103

100-
streamDirMaybe :: Either Path b -> Maybe (Stream IO (Either Path Path))
101-
streamDirMaybe = either (Just . Dir.readEitherPaths) (const Nothing)
104+
streamDirMaybe
105+
:: (Dir.ReadOptions -> Dir.ReadOptions)
106+
-> Either Path b -> Maybe (Stream IO (Either Path Path))
107+
streamDirMaybe f = either (Just . Dir.readEitherPaths f) (const Nothing)
102108

103109
#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
104110
_streamDirByteChunked
105-
:: Either [Path] b -> Stream IO (Either [Path] (Array Word8))
106-
_streamDirByteChunked = either Dir.readEitherByteChunks (const Stream.nil)
111+
:: (Dir.ReadOptions -> Dir.ReadOptions)
112+
-> Either [Path] b -> Stream IO (Either [Path] (Array Word8))
113+
_streamDirByteChunked f = either (Dir.readEitherByteChunks f) (const Stream.nil)
107114

108115
streamDirByteChunkedMaybe
109-
:: Either [Path] b -> Maybe (Stream IO (Either [Path] (Array Word8)))
110-
streamDirByteChunkedMaybe =
111-
either (Just . Dir.readEitherByteChunks) (const Nothing)
116+
:: (Dir.ReadOptions -> Dir.ReadOptions)
117+
-> Either [Path] b -> Maybe (Stream IO (Either [Path] (Array Word8)))
118+
streamDirByteChunkedMaybe f =
119+
either (Just . Dir.readEitherByteChunks f) (const Nothing)
112120
#endif
113121

114-
streamDirChunkedMaybe :: Either [Path] b -> Maybe (Stream IO (Either [Path] [Path]))
115-
streamDirChunkedMaybe = either (Just . Dir.readEitherChunks) (const Nothing)
122+
streamDirChunkedMaybe
123+
:: (Dir.ReadOptions -> Dir.ReadOptions)
124+
-> Either [Path] b -> Maybe (Stream IO (Either [Path] [Path]))
125+
streamDirChunkedMaybe f = either (Just . Dir.readEitherChunks f) (const Nothing)
116126

117-
streamDirChunked :: Either [Path] b -> Stream IO (Either [Path] [Path])
118-
streamDirChunked = either Dir.readEitherChunks (const Stream.nil)
127+
streamDirChunked
128+
:: (Dir.ReadOptions -> Dir.ReadOptions)
129+
-> Either [Path] b -> Stream IO (Either [Path] [Path])
130+
streamDirChunked f = either (Dir.readEitherChunks f) (const Stream.nil)
119131

120132
--------------------------------------------------------------------------------
121133
-- Functions
@@ -142,7 +154,7 @@ createDirStucture root d w = do
142154
listDirByteChunked :: FilePath -> Stream IO (Array Word8)
143155
listDirByteChunked inp = do
144156
Stream.catRights
145-
$ Stream.concatIterateDfs streamDirByteChunkedMaybe
157+
$ Stream.concatIterateDfs (streamDirByteChunkedMaybe id)
146158
$ Stream.fromPure (Left [fromJust $ Path.fromString inp])
147159
#endif
148160

@@ -169,33 +181,121 @@ listDirWith act inp = do
169181
$ act
170182
$ Stream.fromPure (Left (fromJust $ Path.fromString inp))
171183

172-
#define DEF_LIST_DIR(x,y); \
173-
{-# INLINE x #-}; \
174-
x :: [Char] -> Stream IO Word8;\
175-
x = listDirWith (y)
176-
177-
DEF_LIST_DIR(listDirUnfoldDfs, Stream.unfoldIterateDfs unfoldDir)
178-
DEF_LIST_DIR(listDirUnfoldBfs, Stream.unfoldIterateBfs unfoldDir)
179-
DEF_LIST_DIR(listDirUnfoldBfsRev, Stream.unfoldIterateBfsRev unfoldDir)
180-
DEF_LIST_DIR(listDirConcatDfs, Stream.concatIterateDfs streamDirMaybe)
181-
DEF_LIST_DIR(listDirConcatBfs, Stream.concatIterateBfs streamDirMaybe)
182-
DEF_LIST_DIR(listDirConcatBfsRev, Stream.concatIterateBfsRev streamDirMaybe)
183-
DEF_LIST_DIR(listDirAppend, concatIterateWith streamDir StreamK.append)
184-
DEF_LIST_DIR(listDirInterleave, mergeIterateWith streamDir StreamK.interleave)
185-
DEF_LIST_DIR(listDirPar, Stream.parConcatIterate id streamDir)
186-
DEF_LIST_DIR(listDirParInterleaved, Stream.parConcatIterate (Stream.interleaved True) streamDir)
187-
DEF_LIST_DIR(listDirParOrdered, Stream.parConcatIterate (Stream.ordered True) streamDir)
188-
189-
#define DEF_LIST_DIR_CHUNKED(x,y); \
190-
{-# INLINE x #-}; \
191-
x :: [Char] -> Stream IO Word8;\
192-
x = listDirChunkedWith (y)
193-
194-
DEF_LIST_DIR_CHUNKED(listDirChunkDfs, Stream.concatIterateDfs streamDirChunkedMaybe)
195-
DEF_LIST_DIR_CHUNKED(listDirChunkBfs, Stream.concatIterateBfs streamDirChunkedMaybe)
196-
DEF_LIST_DIR_CHUNKED(listDirChunkBfsRev, Stream.concatIterateBfsRev streamDirChunkedMaybe)
197-
DEF_LIST_DIR_CHUNKED(listDirChunkAppend, concatIterateWith streamDirChunked StreamK.append)
198-
DEF_LIST_DIR_CHUNKED(listDirChunkInterleave, mergeIterateWith streamDirChunked StreamK.interleave)
199-
DEF_LIST_DIR_CHUNKED(listDirChunkPar, Stream.parConcatIterate id streamDirChunked)
200-
DEF_LIST_DIR_CHUNKED(listDirChunkParInterleaved, Stream.parConcatIterate (Stream.interleaved True) streamDirChunked)
201-
DEF_LIST_DIR_CHUNKED(listDirChunkParOrdered, Stream.parConcatIterate (Stream.ordered True) streamDirChunked)
184+
--------------------------------------------------------------------------------
185+
-- Non chunked
186+
--------------------------------------------------------------------------------
187+
188+
{-# INLINE listDirUnfoldDfs #-}
189+
listDirUnfoldDfs
190+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
191+
listDirUnfoldDfs f = listDirWith (Stream.unfoldIterateDfs (unfoldDir f))
192+
193+
{-# INLINE listDirUnfoldBfs #-}
194+
listDirUnfoldBfs
195+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
196+
listDirUnfoldBfs f = listDirWith (Stream.unfoldIterateBfs (unfoldDir f))
197+
198+
{-# INLINE listDirUnfoldBfsRev #-}
199+
listDirUnfoldBfsRev
200+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
201+
listDirUnfoldBfsRev f = listDirWith (Stream.unfoldIterateBfsRev (unfoldDir f))
202+
203+
{-# INLINE listDirConcatDfs #-}
204+
listDirConcatDfs
205+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
206+
listDirConcatDfs f = listDirWith (Stream.concatIterateDfs (streamDirMaybe f))
207+
208+
{-# INLINE listDirConcatBfs #-}
209+
listDirConcatBfs
210+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
211+
listDirConcatBfs f = listDirWith (Stream.concatIterateBfs (streamDirMaybe f))
212+
213+
{-# INLINE listDirConcatBfsRev #-}
214+
listDirConcatBfsRev
215+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
216+
listDirConcatBfsRev f =
217+
listDirWith (Stream.concatIterateBfsRev (streamDirMaybe f))
218+
219+
{-# INLINE listDirAppend #-}
220+
listDirAppend
221+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
222+
listDirAppend f = listDirWith (concatIterateWith (streamDir f) StreamK.append)
223+
224+
{-# INLINE listDirInterleave #-}
225+
listDirInterleave
226+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
227+
listDirInterleave f =
228+
listDirWith (mergeIterateWith (streamDir f) StreamK.interleave)
229+
230+
{-# INLINE listDirPar #-}
231+
listDirPar
232+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
233+
listDirPar f = listDirWith (Stream.parConcatIterate id (streamDir f))
234+
235+
{-# INLINE listDirParInterleaved #-}
236+
listDirParInterleaved
237+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
238+
listDirParInterleaved f =
239+
listDirWith
240+
(Stream.parConcatIterate (Stream.interleaved True) (streamDir f))
241+
242+
{-# INLINE listDirParOrdered #-}
243+
listDirParOrdered
244+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
245+
listDirParOrdered f =
246+
listDirWith (Stream.parConcatIterate (Stream.ordered True) (streamDir f))
247+
248+
--------------------------------------------------------------------------------
249+
-- Chunked
250+
--------------------------------------------------------------------------------
251+
252+
{-# INLINE listDirChunkDfs #-}
253+
listDirChunkDfs
254+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
255+
listDirChunkDfs f =
256+
listDirChunkedWith (Stream.concatIterateDfs (streamDirChunkedMaybe f))
257+
258+
{-# INLINE listDirChunkBfs #-}
259+
listDirChunkBfs
260+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
261+
listDirChunkBfs f =
262+
listDirChunkedWith (Stream.concatIterateBfs (streamDirChunkedMaybe f))
263+
264+
{-# INLINE listDirChunkBfsRev #-}
265+
listDirChunkBfsRev
266+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
267+
listDirChunkBfsRev f =
268+
listDirChunkedWith (Stream.concatIterateBfsRev (streamDirChunkedMaybe f))
269+
270+
{-# INLINE listDirChunkAppend #-}
271+
listDirChunkAppend
272+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
273+
listDirChunkAppend f =
274+
listDirChunkedWith (concatIterateWith (streamDirChunked f) StreamK.append)
275+
276+
{-# INLINE listDirChunkInterleave #-}
277+
listDirChunkInterleave
278+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
279+
listDirChunkInterleave f =
280+
listDirChunkedWith
281+
(mergeIterateWith (streamDirChunked f) StreamK.interleave)
282+
283+
{-# INLINE listDirChunkPar #-}
284+
listDirChunkPar
285+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
286+
listDirChunkPar f =
287+
listDirChunkedWith (Stream.parConcatIterate id (streamDirChunked f))
288+
289+
{-# INLINE listDirChunkParInterleaved #-}
290+
listDirChunkParInterleaved
291+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
292+
listDirChunkParInterleaved f =
293+
listDirChunkedWith
294+
(Stream.parConcatIterate (Stream.interleaved True) (streamDirChunked f))
295+
296+
{-# INLINE listDirChunkParOrdered #-}
297+
listDirChunkParOrdered
298+
:: (Dir.ReadOptions -> Dir.ReadOptions) -> [Char] -> Stream IO Word8
299+
listDirChunkParOrdered f =
300+
listDirChunkedWith
301+
(Stream.parConcatIterate (Stream.ordered True) (streamDirChunked f))

benchmark/Streamly/Benchmark/FileSystem/DirIO.hs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,42 +52,42 @@ main = do
5252
-- openDirStream: resource exhausted (Too many open files)
5353
-- if a bigger directory tree is used
5454
[ bench "listDirUnfoldDfs (big)" $ nfIO $
55-
Stream.fold Fold.drain $ listDirUnfoldDfs bigTree
55+
Stream.fold Fold.drain $ listDirUnfoldDfs id bigTree
5656
, bench "listDirUnfoldBfs (small)" $ nfIO $
57-
Stream.fold Fold.drain $ listDirUnfoldBfs smallTree
57+
Stream.fold Fold.drain $ listDirUnfoldBfs id smallTree
5858
, bench "listDirUnfoldBfsRev (small)" $ nfIO $
59-
Stream.fold Fold.drain $ listDirUnfoldBfsRev smallTree
59+
Stream.fold Fold.drain $ listDirUnfoldBfsRev id smallTree
6060
, bench "listDirConcatDfs (big)" $ nfIO $
61-
Stream.fold Fold.drain $ listDirConcatDfs bigTree
61+
Stream.fold Fold.drain $ listDirConcatDfs id bigTree
6262
, bench "listDirConcatBfs (small)" $ nfIO $
63-
Stream.fold Fold.drain $ listDirConcatBfs smallTree
63+
Stream.fold Fold.drain $ listDirConcatBfs id smallTree
6464
, bench "listDirConcatBfsRev (small)" $ nfIO $
65-
Stream.fold Fold.drain $ listDirConcatBfsRev smallTree
65+
Stream.fold Fold.drain $ listDirConcatBfsRev id smallTree
6666
, bench "listDirAppend (big)" $ nfIO $
67-
Stream.fold Fold.drain $ listDirAppend bigTree
67+
Stream.fold Fold.drain $ listDirAppend id bigTree
6868
, bench "listDirInterleave (big)" $ nfIO $
69-
Stream.fold Fold.drain $ listDirInterleave bigTree
69+
Stream.fold Fold.drain $ listDirInterleave id bigTree
7070
, bench "listDirPar (big)" $ nfIO $
71-
Stream.fold Fold.drain $ listDirPar bigTree
71+
Stream.fold Fold.drain $ listDirPar id bigTree
7272
, bench "listDirParInterleaved (big)" $ nfIO $
73-
Stream.fold Fold.drain $ listDirParInterleaved bigTree
73+
Stream.fold Fold.drain $ listDirParInterleaved id bigTree
7474
, bench "listDirParOrdered (big)" $ nfIO $
75-
Stream.fold Fold.drain $ listDirParOrdered bigTree
75+
Stream.fold Fold.drain $ listDirParOrdered id bigTree
7676
, bench "listDirChunkDfs (big)" $ nfIO $
77-
Stream.fold Fold.drain $ listDirChunkDfs bigTree
77+
Stream.fold Fold.drain $ listDirChunkDfs id bigTree
7878
, bench "listDirChunkBfs (small)" $ nfIO $
79-
Stream.fold Fold.drain $ listDirChunkBfs smallTree
79+
Stream.fold Fold.drain $ listDirChunkBfs id smallTree
8080
, bench "listDirChunkBfsRev (small)" $ nfIO $
81-
Stream.fold Fold.drain $ listDirChunkBfsRev smallTree
81+
Stream.fold Fold.drain $ listDirChunkBfsRev id smallTree
8282
, bench "listDirChunkAppend (big)" $ nfIO $
83-
Stream.fold Fold.drain $ listDirChunkAppend bigTree
83+
Stream.fold Fold.drain $ listDirChunkAppend id bigTree
8484
, bench "listDirChunkInterleave (big)" $ nfIO $
85-
Stream.fold Fold.drain $ listDirChunkInterleave bigTree
85+
Stream.fold Fold.drain $ listDirChunkInterleave id bigTree
8686
, bench "listDirChunkPar (big)" $ nfIO $
87-
Stream.fold Fold.drain $ listDirChunkPar bigTree
87+
Stream.fold Fold.drain $ listDirChunkPar id bigTree
8888
, bench "listDirChunkParInterleaved (big)" $ nfIO $
89-
Stream.fold Fold.drain $ listDirChunkParInterleaved bigTree
89+
Stream.fold Fold.drain $ listDirChunkParInterleaved id bigTree
9090
, bench "listDirChunkParOrdered (big)" $ nfIO $
91-
Stream.fold Fold.drain $ listDirChunkParOrdered bigTree
91+
Stream.fold Fold.drain $ listDirChunkParOrdered id bigTree
9292
]
9393
]

core/src/Streamly/Internal/Data/Stream/Type.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ concatIterateBfsRev f stream = Stream step (stream, [])
15681568
--
15691569
-- Example, list a directory tree using BFS:
15701570
--
1571-
-- >>> f = either (Just . Dir.readEitherPaths) (const Nothing)
1571+
-- >>> f = either (Just . Dir.readEitherPaths id) (const Nothing)
15721572
-- >>> input = Stream.fromEffect (Left <$> Path.fromString ".")
15731573
-- >>> ls = Stream.concatIterateBfs f input
15741574
--
@@ -1607,7 +1607,7 @@ concatIterateBfs f stream = Stream step (stream, [], [])
16071607
--
16081608
-- Example, list a directory tree using DFS:
16091609
--
1610-
-- >>> f = either (Just . Dir.readEitherPaths) (const Nothing)
1610+
-- >>> f = either (Just . Dir.readEitherPaths id) (const Nothing)
16111611
-- >>> input = Stream.fromEffect (Left <$> Path.fromString ".")
16121612
-- >>> ls = Stream.concatIterateDfs f input
16131613
--
@@ -1648,7 +1648,7 @@ data IterateUnfoldState o i =
16481648
--
16491649
-- Example, list a directory tree using DFS:
16501650
--
1651-
-- >>> f = Unfold.either Dir.eitherReaderPaths Unfold.nil
1651+
-- >>> f = Unfold.either (Dir.eitherReaderPaths id) Unfold.nil
16521652
-- >>> input = Stream.fromEffect (Left <$> Path.fromString ".")
16531653
-- >>> ls = Stream.unfoldIterateDfs f input
16541654
--

core/src/Streamly/Internal/Data/StreamK/Type.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ concatUnfoldr = undefined
15421542
--
15431543
-- Example, list a directory tree using DFS:
15441544
--
1545-
-- >>> f = StreamK.fromStream . either Dir.readEitherPaths (const Stream.nil)
1545+
-- >>> f = StreamK.fromStream . either (Dir.readEitherPaths id) (const Stream.nil)
15461546
-- >>> input = StreamK.fromEffect (Left <$> Path.fromString ".")
15471547
-- >>> ls = StreamK.concatIterateWith StreamK.append f input
15481548
--
@@ -1572,7 +1572,7 @@ concatIterateWith combine f = iterateStream
15721572
--
15731573
-- Example, list a directory tree using balanced traversal:
15741574
--
1575-
-- >>> f = StreamK.fromStream . either Dir.readEitherPaths (const Stream.nil)
1575+
-- >>> f = StreamK.fromStream . either (Dir.readEitherPaths id) (const Stream.nil)
15761576
-- >>> input = StreamK.fromEffect (Left <$> Path.fromString ".")
15771577
-- >>> ls = StreamK.mergeIterateWith StreamK.interleave f input
15781578
--
@@ -1663,7 +1663,7 @@ concatMapEitherWith = undefined
16631663
-- To traverse a directory tree:
16641664
--
16651665
-- >>> input = StreamK.fromEffect (Left <$> Path.fromString ".")
1666-
-- >>> ls = StreamK.concatIterateLeftsWith StreamK.append (StreamK.fromStream . Dir.readEither) input
1666+
-- >>> ls = StreamK.concatIterateLeftsWith StreamK.append (StreamK.fromStream . Dir.readEither id) input
16671667
--
16681668
-- /Pre-release/
16691669
--

core/src/Streamly/Internal/FileSystem/Dir.hs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,20 @@ pMapUnfoldE = fmap ePathMap . Unfold.lmapM Path.fromString
123123
-- Functions
124124
--------------------------------------------------------------------------------
125125

126+
#if defined(mingw32_HOST_OS) || defined(__MINGW32__)
127+
#define CONF id
128+
#else
129+
#define CONF (DirIO.followSymlinks True)
130+
#endif
131+
126132
-- | Read a directory emitting a stream with names of the children. Filter out
127133
-- "." and ".." entries.
128134
--
129135
-- /Internal/
130136
--
131137
{-# INLINE reader #-}
132138
reader :: (MonadIO m, MonadCatch m) => Unfold m FilePath FilePath
133-
reader = fmap Path.toString $ Unfold.lmapM Path.fromString DirIO.reader
139+
reader = fmap Path.toString $ Unfold.lmapM Path.fromString (DirIO.reader CONF)
134140

135141
-- | Read directories as Left and files as Right. Filter out "." and ".."
136142
-- entries.
@@ -139,12 +145,12 @@ reader = fmap Path.toString $ Unfold.lmapM Path.fromString DirIO.reader
139145
--
140146
{-# INLINE eitherReader #-}
141147
eitherReader :: (MonadIO m, MonadCatch m) => Unfold m FilePath (Either FilePath FilePath)
142-
eitherReader = pMapUnfoldE DirIO.eitherReader
148+
eitherReader = pMapUnfoldE (DirIO.eitherReader CONF)
143149

144150

145151
{-# INLINE eitherReaderPaths #-}
146152
eitherReaderPaths ::(MonadIO m, MonadCatch m) => Unfold m FilePath (Either FilePath FilePath)
147-
eitherReaderPaths = pMapUnfoldE DirIO.eitherReaderPaths
153+
eitherReaderPaths = pMapUnfoldE (DirIO.eitherReaderPaths CONF)
148154

149155
--
150156
-- | Read files only.
@@ -153,15 +159,15 @@ eitherReaderPaths = pMapUnfoldE DirIO.eitherReaderPaths
153159
--
154160
{-# INLINE fileReader #-}
155161
fileReader :: (MonadIO m, MonadCatch m) => Unfold m FilePath FilePath
156-
fileReader = pMapUnfold DirIO.fileReader
162+
fileReader = pMapUnfold (DirIO.fileReader CONF)
157163

158164
-- | Read directories only. Filter out "." and ".." entries.
159165
--
160166
-- /Internal/
161167
--
162168
{-# INLINE dirReader #-}
163169
dirReader :: (MonadIO m, MonadCatch m) => Unfold m FilePath FilePath
164-
dirReader = pMapUnfold DirIO.dirReader
170+
dirReader = pMapUnfold (DirIO.dirReader CONF)
165171

166172
-- | Raw read of a directory.
167173
--

0 commit comments

Comments
 (0)