Path.rglob

Path[] rglob(string pattern) const

Recursively globs for entries matching pattern under this path.

Equivalent to calling glob with a recursive prefix (double-star plus a separator) added in front of pattern, with proper handling to avoid adding it when pattern already starts with a recursive prefix.

Examples

// Shorthand for a recursive pattern like: ** + "/" + "file.txt"
auto matches = Path("/project").rglob("file.txt");

See: glob for full semantics.