Path.rglobSync() method
pathlib-ts > Path > rglobSync
Path.rglobSync() method
Section titled “Path.rglobSync() method”Performs a recursive glob search synchronously.
Signature:
rglobSync(pattern: string, options?: fs.GlobOptions): Path[];Parameters
Section titled “Parameters”|
Parameter |
Type |
Description |
|---|---|---|
|
pattern |
string |
Glob pattern to evaluate recursively. |
|
options |
fs.GlobOptions |
(Optional) Options forwarded to Node’s glob implementation. |
Returns:
Path[]
Matching Path objects.
Remarks
Section titled “Remarks”Delegates to Path.globSync() using a pattern that prepends the recursive "**" segment.
Example
Section titled “Example”Discovering translation files synchronously
import { Path } from "pathlib-ts";
const repo = new Path("./packages");const translations = repo.rglobSync("**.json");console.log(translations.length);