hakyll-4.16.6.0: A static website compiler library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hakyll.Core.Util.File

Description

A module containing various file utility functions

Synopsis

Documentation

makeDirectories :: FilePath -> IO () Source #

Given a path to a file, try to make the path writable by making all directories on the path.

getRecursiveContents Source #

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).

withPermissions Source #

Arguments

:: IO a 
-> a

Default value to return in case of a permission error

-> IO a 

Perform an IO action, catching any permission errors and returning a default value in their place. All other exceptions are rethrown.