Skip to content
This repository has been archived by the owner on Sep 17, 2018. It is now read-only.

Latest commit

 

History

History
22 lines (18 loc) · 507 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 507 Bytes

pathwalk

Some really simple path walking tools and utilities for Haskell.

module Main (main) where

import Control.Monad (forM_)
import System.Directory.PathWalk (pathWalk)
import System.Environment (getArgs)

main :: IO ()
main = do
  rawArgs <- getArgs
  let args = if rawArgs == [] then ["."] else rawArgs
  forM_ args $ \arg -> do
    pathWalk arg $ \root dirs files -> do
      putStrLn root
      putStrLn $ "  dirs: " ++ show dirs
      putStrLn $ "  files: " ++ show files