Is there already a lib to work with filepath glob?

Hi, Say for logic of Bash code `for f in /somePath/*/*; do ... done`, with filepath, directory packages, I have to do something like `listDirectoryContent "somePath" >>= mapM_ (\fp -> listDirectoryContent fp >>= action)`. It is not as expressive as the script. Especially when I'd like to use conduit to stream the folder. So is there already something I can use to make the logic expressive? PS: I know there are some libs to match a filepath against a glob string. But that is not what I want.

Ah, `conduit-find`. Seems appropriate.
Thread terminated.
On Sun, May 26, 2019 at 2:58 PM Magicloud Magiclouds
Hi,
Say for logic of Bash code `for f in /somePath/*/*; do ... done`, with filepath, directory packages, I have to do something like `listDirectoryContent "somePath" >>= mapM_ (\fp -> listDirectoryContent fp >>= action)`. It is not as expressive as the script. Especially when I'd like to use conduit to stream the folder.
So is there already something I can use to make the logic expressive?
PS: I know there are some libs to match a filepath against a glob string. But that is not what I want.
participants (1)
-
Magicloud Magiclouds