directory-layout-0.1.0.0: Declare, construct and verify directory layout

Safe HaskellNone

System.Directory.Layout.Check

Description

Check if current directory layout agrees with specified one

For example, suppose there is a tree:

 % tree
 .
 ├── baz
 │   └── twey
 └── foo
     ├── bar
     │   ├── quuz
     │   └── tatata
     └── quux

then you can write:

 layout = do
   directory "baz" $
     file_ "twey"
   directory "foo" $ do
     directory "bar" $ do
       file_ "quuz"
       file_ "tatata"
     file_ "quux"

and running check layout "." should result in []

Synopsis

Documentation

data DLCheckFailure Source

Data type representing various failures that may occur while checking directory layout

checkSource

Arguments

:: Layout 
-> FilePath

Root directory

-> IO [DLCheckFailure]

List of failures

Check directory layout corresponds to specified one