Gist 133cb61af931a08bbe20
✓ Published0🌍 Public
FFranklin Chen
Last edited Oct 20, 2015
Created on Oct 20, 2015
This example demonstrates recursive directory traversal as a streaming pipeline in Haskell, yielding each file path as a producer. The code uses the `Pipes` library, with `getRecursiveContents` recursively descending into subdirectories via `getDirectoryContents` and filtering out `.` and `..`. Each file path is then piped through `P.map` to prefix `"Found file "` and sent to `P.stdoutLn` for output. The main function takes a starting path from command-line arguments via `getArgs`, illustrating a functional, lazy approach to filesystem enumeration.
AI-generated description