headroom-0.1.1.0: License Header Manager
Copyright(c) 2019-2020 Vaclav Svejcar
LicenseBSD-3
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.FileSystem

Description

Functions for manipulating files and directories.

Synopsis

Documentation

findFiles Source #

Arguments

:: MonadIO m 
=> FilePath

path to search

-> (FilePath -> Bool)

predicate to match filename

-> m [FilePath]

found files

Recursively finds files on given path whose filename matches the predicate.

findFilesByExts Source #

Arguments

:: MonadIO m 
=> FilePath

path to search

-> [Text]

list of file extensions (without dot)

-> m [FilePath]

list of found files

Recursively finds files on given path by file extensions.

findFilesByTypes Source #

Arguments

:: MonadIO m 
=> FilePath

path to search

-> [FileType]

list of file types

-> m [FilePath]

list of found files

Recursively find files on given path by their file types.

listFiles Source #

Arguments

:: MonadIO m 
=> FilePath

path to search

-> m [FilePath]

list of found files

Recursively find all files on given path. If file reference is passed instead of directory, such file path is returned.

loadFile Source #

Arguments

:: MonadIO m 
=> FilePath

file path

-> m Text

file content

Loads file content in UTF8 encoding.