Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
pathWalk :: FilePath -> (FilePath -> [FilePath] -> [FilePath] -> IO ()) -> IO () Source
pathWalk
recursively enumerates the given root directory,
calling callback once per directory with the traversed directory name, a list of subdirectories, and a list of files.
The subdirectories and file names are always relative to the root given.
pathWalk "src" $ \dir subdirs files -> do forM_ files $ \file -> do when ("Test.hs" `isSuffixOf` file) $ do registerTestFile $ dir </> file