PurePath.match() method
pathlib-ts > PurePath > match
PurePath.match() method
Section titled “PurePath.match() method”Checks whether the path matches a non-recursive glob pattern.
Signature:
match(pattern: PathLike, options?: { caseSensitive?: boolean; }): boolean;Parameters
Section titled “Parameters”|
Parameter |
Type |
Description |
|---|---|---|
|
pattern |
Pattern to evaluate. Recursive wildcards are treated like | |
|
options |
{ caseSensitive?: boolean; } |
(Optional) Optional case sensitivity override. |
Returns:
boolean
true when the suffix of the path satisfies the pattern.
Remarks
Section titled “Remarks”Relative patterns are matched from the right-hand side; recursive ** is not supported, mirroring CPython. Use PurePath.fullMatch() when you need to inspect the entire path.