pub fn is_match<'p>(
expression: &str,
path: impl Into<CandidatePath<'p>>
) -> Result<bool, GlobError<'_>>
Expand description
Returns true
if a path matches a glob expression.
This function directly matches an expression without exposing an
intermediate Glob
. Prefer Glob::is_match
if an expression is matched
more than once. The given path must be convertible into a CandidatePath
.
Errors
Returns an error if the glob expression could not be parsed or is
malformed. See the documentation for ParseError
and RuleError
.