pathwalk: Path walking utilities for Haskell programs

[ library, mit, system ] [ Propose Tags ]

System.Directory.PathWalk is an implementation of Python's excellent os.walk function. Given a root directory, it recursively scans all subdirectories, calling a callback with directories and files it finds. Importantly, it calls the callback as soon as it finishes scanning each directory to allow the caller to begin processing results immediately.

Maximum memory usage is O(N+M) where N is the depth of the tree and M is the maximum number of entries in a particular directory.

import System.Directory.PathWalk

pathWalk "some/directory" $ \root dirs files -> do
  forM_ files $ \file ->
    when (".hs" `isSuffixOf` file) $ do
      putStrLn $ joinPath [root, file]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.2.0.0, 0.2.1.0, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.3.1.2
Dependencies base (>=3 && <5), directory (>=1.2), filepath (>=1.3), transformers (>=0.3.0.0) [details]
License MIT
Author Christine Dodrill
Maintainer xena@yolo-swag.com
Category System
Home page https://github.com/Xe/pathwalk
Source repo head: git clone https://github.com/Xe/pathwalk
Uploaded by chadaustin at 2015-10-28T15:08:16Z
Distributions LTSHaskell:0.3.1.2, NixOS:0.3.1.2, Stackage:0.3.1.2
Reverse Dependencies 4 direct, 0 indirect [details]
Downloads 6604 total (49 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-10-30 [all 1 reports]