An experimental library that provides basic functions for efficient streaming over directory trees, compatible with the Haskell Pipes ecosystem.
Please note that this library is still experimental and in development. Using it may delete all the files on your hard disk or even burn down your house (although it probably won't).
Pipes.FileSystem.children to iterate (non-recursively) over all children of given directory.
Pipes.FileSystem.descendants to iterate (recursively) over all descendants of a given directory.
Traversal order can be specified using
In order to stream the contents of directory trees as efficiently as possible, this library uses the Linux
readdir function which provides extended type information about each directory entry. (This is in contrast to the POSIX-compliant version of
readdir, which only provides the name of each directory entry, and no type information.) This type information is made available to downstream consumers through the
FileInfo type, thus making it possible for consumers to avoid the expense of calling
stat in many situations.
Currently this library only supports Linux. Support for other operating systems such as Windows or other UNIX-like operating systems could be added if enough people want it. Feel free to contribute a patch!
This may change in future.