Matches root-relative paths against shell-style globs without touching the filesystem, so deleted files match too.
**matches any run of characters,/included;**/also matches no directory at all (**/*.mdmatchesREADME.md)*matches any run of characters except/?matches one character except/{a,b}matches either alternative (alternatives may hold globs)
A glob matches the whole path. A leading ./ is ignored on both sides.
Every other character is literal, so a glob with no metacharacter matches
exactly one path: "lib/workers" never matches lib/workers/a.ex
(literal?/1; write "lib/workers/**"). Unbalanced braces are an error
(compile/1), never a guess.
Summary
Functions
Compiles glob to an anchored regex, or explains why it is malformed (a
{ never closed, a } never opened, bytes that are not valid UTF-8).
Never raises.
Whether path matches any of globs; returns the first matching glob or nil.
Whether glob has no metacharacter (*, ?, {), so it matches one path only.
Whether path matches glob; raises ArgumentError on a glob compile/1 rejects.
Functions
Compiles glob to an anchored regex, or explains why it is malformed (a
{ never closed, a } never opened, bytes that are not valid UTF-8).
Never raises.
Whether path matches any of globs; returns the first matching glob or nil.
Whether glob has no metacharacter (*, ?, {), so it matches one path only.
Whether path matches glob; raises ArgumentError on a glob compile/1 rejects.