Safe Haskell | None |
---|
Layout
traverses
- make :: Layout -> FilePath -> IO [LayoutException]
- check :: Layout -> FilePath -> IO [LayoutException]
Documentation
:: Layout | |
-> FilePath | Root directory |
-> IO [LayoutException] | List of warnings |
Make layout as specified
For example, suppose you are in an empty directory
% tree .
and you've written simple layout:
layout = do directory "baz" $ file_ "twey" directory "foo" $ do directory "bar" $ do file_ "quuz" file_ "tatata" file_ "quux"
then running it should result in this directory tree:
% tree . ├── baz │ └── twey └── foo ├── bar │ ├── quuz │ └── tatata └── quux
:: Layout | |
-> FilePath | Root directory |
-> IO [LayoutException] | List of failures |
Check 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 []