find package:filemanip

Search a directory recursively, with recursion controlled by a RecursionPredicate. Lazily return a sorted list of all files matching the given FilterPredicate. Any errors that occur are ignored, with warnings printed to stderr.
This module provides functions for traversing a filesystem hierarchy. The find function generates a lazy list of matching files, while fold performs a left fold. Both find and fold allow fine control over recursion, using the FindClause type. This type is also used to pre-filter the results returned by find. The FindClause type lets you write filtering and recursion control expressions clearly and easily. For example, this clause matches C source files.
extension ==? ".c" ||? extension ==? ".h"
Because FindClause is a monad, you can use the usual monad machinery to, for example, lift pure functions into it. Here's a clause that will return True for any file whose directory name contains the word "temp".
(isInfixOf "temp") `liftM` directory
Search a directory recursively, with recursion controlled by a RecursionPredicate. Lazily return a sorted list of all files matching the given FilterPredicate. Any errors that occur are dealt with by the given handler.
Monadic container for file information, allowing for clean construction of combinators. Wraps the State monad, but doesn't allow get or put.