Segment-aware glob matching against Dust.Protocol.Path segment
lists.
Mirrors DustProtocol.Glob from the canonical wire-protocol
package.
Pattern grammar
A pattern is a non-empty list of pattern segments. Each segment is either:
"*"— matches exactly one path segment"**"— matches one or more path segments; only valid in the tail position"\*"— matches a path segment that is literally"*""\**"— matches a path segment that is literally"**"- any other string — matches that exact path segment
Patterns can also be given as rendered slash strings, decoded with
the same JSON Pointer escape rules as Dust.Protocol.Path.
Summary
Types
Functions
@spec compile(pattern_input()) :: {:ok, compiled()} | {:error, error()}
@spec compile!(pattern_input()) :: compiled()
@spec match?(compiled() | pattern_input(), [String.t()]) :: boolean()