Copyright | (c) Reuben D'Netto 2016 |
---|---|
License | Apache 2.0 |
Maintainer | rdnetto@gmail.com |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
This module provides a wrapper around the glob(3) C function, which finds file paths matching a given pattern. All of the standard flags are supported, though GNU extensions are contained in the System.Directory.Glob.GNU module to encourage portability.
Documentation
:: GlobFlag | The control flags to apply. |
-> String | The pattern. |
-> IO [FilePath] | The paths matching the pattern. |
Finds pathnames matching a pattern. e.g foo*
, prog_v?
, ba[zr]
, etc.
globDefaults :: GlobFlag Source #
Default value - equivalent to 0 for the C function.
:: GlobFlag | The control flags to apply. |
-> [String] | A list of patterns to apply. |
-> IO [FilePath] | The paths matching the patterns. |
Like glob, but matches against multiple patterns. This function only allocates and marshals data once, making it more efficient than multiple glob calls.
Control flags for glob. Use globDefaults
if you have no special requirements.
To combine multiple flags, use the <>
operator (re-exported here for convenience).
See man glob(3) for more information.
globNoCheck :: GlobFlag Source #
If there are no matches, return the original pattern.
globNoEscape :: GlobFlag Source #
Disable the use of @@ for escaping metacharacters.
globNoSort :: GlobFlag Source #
Do not sort the entries before returning them.