| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
System.FilePath.Glob.Primitive
Description
A number of primitives from which complete Patterns may be constructed.
Using this together with the functions provided by the Monoid instance of
Pattern allows for direct manipulation of Patterns beyond what can be
done with just the compile family of functions. And of course you don't
have to go via Strings if you use these.
Documentation
singleWildcard :: Pattern Source #
Matches any single character except a path separator: corresponds to the
? operator.
Matches any number of characters up to a path separator: corresponds to the
* operator.
recursiveWildcard :: Pattern Source #
Matches any number of characters including path separators: corresponds to
the **/ operator.
charRange :: Bool -> [Either Char (Char, Char)] -> Pattern Source #
Matches a single character if it is within the (inclusive) range in any
Right or if it is equal to the character in any Left. Corresponds to the
[], [^] and [!] operators.
If the given Bool is False, the result of the match is inverted: the
match succeeds if the character does not match according to the above
rules.