2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-12-03 11:52:43 +00:00
bazel-lib/docs/glob_match.md
Alex Eagle 0f5e1dcafd
chore(deps): upgrade stardoc (#894)
* chore(deps): upgrade stardoc

This uses the Bazel 7 'starlark_doc_extract' rule which our docsite expects for slurping data.

* chore: stardoc setup in WORKSPACE too

* chore: skip stardoc on bazel 6 in cases where the legacy extractor produces different docstrings
2024-08-08 12:56:11 -07:00

1.7 KiB
Generated

Public API

glob_match

glob_match(expr, path, match_path_separator)

Test if the passed path matches the glob expression.

* A single asterisk stands for zero or more arbitrary characters except for the the path separator / if match_path_separator is False

? The question mark stands for exactly one character except for the the path separator / if match_path_separator is False

** A double asterisk stands for an arbitrary sequence of 0 or more characters. It is only allowed when preceded by either the beginning of the string or a slash. Likewise it must be followed by a slash or the end of the pattern.

PARAMETERS

Name Description Default Value
expr the glob expression none
path the path against which to match the glob expression none
match_path_separator whether or not to match the path separator '/' when matching * and ? expressions False

RETURNS

True if the path matches the glob expression

is_glob

is_glob(expr)

Determine if the passed string is a global expression

PARAMETERS

Name Description Default Value
expr the potential glob expression none

RETURNS

True if the passed string is a global expression