Copyright | (c) 2019-2020 Vaclav Svejcar |
---|---|
License | BSD-3 |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Functions for manipulating files and directories.
Synopsis
- findFiles :: MonadIO m => FilePath -> (FilePath -> Bool) -> m [FilePath]
- findFilesByExts :: MonadIO m => FilePath -> [Text] -> m [FilePath]
- findFilesByTypes :: MonadIO m => FilePath -> [FileType] -> m [FilePath]
- listFiles :: MonadIO m => FilePath -> m [FilePath]
- loadFile :: MonadIO m => FilePath -> m Text
Documentation
:: 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.
:: 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.
:: 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.
Recursively find all files on given path. If file reference is passed instead of directory, such file path is returned.