Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hakyll.Core.Util.File
Description
A module containing various file utility functions
Synopsis
- makeDirectories :: FilePath -> IO ()
- getRecursiveContents :: (FilePath -> IO Bool) -> FilePath -> IO [FilePath]
- removeDirectory :: FilePath -> IO ()
- withPermissions :: IO a -> a -> IO a
Documentation
makeDirectories :: FilePath -> IO () Source #
Given a path to a file, try to make the path writable by making all directories on the path.
Arguments
:: (FilePath -> IO Bool) | Ignore this file/directory |
-> FilePath | Directory to search |
-> IO [FilePath] | List of files found for which you have permissions |
Get all contents of a directory.
If a directory is encountered for which you do not have permission, the directory will be skipped instead of an exception being thrown.
If a dangling/broken symbolic link is encountered, then it will be skipped (since returning it may cause callers to throw exceptions).
removeDirectory :: FilePath -> IO () Source #
Perform an IO action, catching any permission errors and returning a default value in their place. All other exceptions are rethrown.