Skip to content

path_matching

Matching files and patterns.

Functions

matches_any_glob

matches_any_glob(
    path: Union[str, Path], patterns: List[str]
) -> bool

Does the path match any of the glob patterns?

PARAMETER DESCRIPTION
path

Path to test

TYPE: Union[str, Path]

patterns

A list of glob patterns

TYPE: List[str]

RETURNS DESCRIPTION
bool

True if it matches any of the patterns

rel_fnmatch

rel_fnmatch(name: str, pat: str) -> bool

Force a relative match of the pattern by prefixing a *.