diff --git a/machines-directory.cabal b/machines-directory.cabal
--- a/machines-directory.cabal
+++ b/machines-directory.cabal
@@ -1,5 +1,5 @@
 name:                machines-directory
-version:             0.2.0.10
+version:             0.2.1.0
 synopsis:            Directory (system) utilities for the machines library
 homepage:            http://github.com/aloiscochard/machines-directory
 license:             Apache-2.0
diff --git a/src/System/Directory/Machine.hs b/src/System/Directory/Machine.hs
--- a/src/System/Directory/Machine.hs
+++ b/src/System/Directory/Machine.hs
@@ -13,14 +13,29 @@
 
 import System.Directory.Machine.Internal
 
+-- | Recursively (breadth-first) walk thru the directory structure.
+--
+-- >>> runT (files <~ directoryWalk <~ source ["."])
+-- ["./.gitignore",...
 directoryWalk :: ProcessT IO FilePath FilePath
-directoryWalk = MachineT . return $ Await (\root -> f [root] []) Refl stopped where
-  f []    []      = directoryWalk
-  f xs    (y:ys)  = MachineT . return $ Yield y $ f xs ys
+directoryWalk = directoryWalk' (const True)
+
+-- | A variant of 'directoryWalk' with a predicate whether to descend
+-- into particular directory.
+--
+-- @
+-- directoryWalk' (not . isSuffixOf ".git")
+-- @
+--
+-- @since 0.2.1.0
+directoryWalk' :: (FilePath -> Bool) -> ProcessT IO FilePath FilePath
+directoryWalk' p = MachineT . return $ Await (\root -> f [root] []) Refl stopped where
+  f []     []      = directoryWalk
+  f xs     (y:ys)  = MachineT . return $ Yield y $ f xs ys
   f (x:xs) []      = MachineT $ do
     ys <- getDirectoryContents x
     let contents = (x </>) <$> (filter isDirectoryContentsValid $ ys)
-    dirs <- filterM doesDirectoryExist contents
+    dirs <- filterM doesDirectoryExist (filter p contents)
     runMachineT $ f (dirs ++ xs) contents
 
 directoryContents :: ProcessT IO FilePath [FilePath]
diff --git a/src/System/Directory/Machine/Internal.hs b/src/System/Directory/Machine/Internal.hs
--- a/src/System/Directory/Machine/Internal.hs
+++ b/src/System/Directory/Machine/Internal.hs
@@ -1,13 +1,6 @@
 module System.Directory.Machine.Internal where
 
-import Data.Machine
-
--- TODO Contribute to machines?
-joined :: Process [a] a
-joined = f [] where
-  f []      = MachineT . return $ Await (\xs -> f xs) Refl stopped
-  f (x:xs)  = MachineT . return $ Yield x $ f xs
-
+-- | Predicate to filter out relative paths: @"."@ and @".."@.
 isDirectoryContentsValid :: FilePath -> Bool
 isDirectoryContentsValid x = (x /= "." && x /= "..")
 
