MCPcopy Index your code
hub / github.com/cool-RR/PySnooper / rglob

Method rglob

tests/mini_toolbox/pathlib.py:1304–1314  ·  view source on GitHub ↗

Recursively yield all existing files (of any kind, including directories) matching the given pattern, anywhere in this subtree.

(self, pattern)

Source from the content-addressed store, hash-verified

1302 yield p
1303
1304 def rglob(self, pattern):
1305 """Recursively yield all existing files (of any kind, including
1306 directories) matching the given pattern, anywhere in this subtree.
1307 """
1308 pattern = self._flavour.casefold(pattern)
1309 drv, root, pattern_parts = self._flavour.parse_parts((pattern,))
1310 if drv or root:
1311 raise NotImplementedError("Non-relative patterns are unsupported")
1312 selector = _make_selector(("**",) + tuple(pattern_parts))
1313 for p in selector.select_from(self):
1314 yield p
1315
1316 def absolute(self):
1317 """Return an absolute version of this path. This function works

Callers

nothing calls this directly

Calls 4

_make_selectorFunction · 0.85
parse_partsMethod · 0.80
select_fromMethod · 0.80
casefoldMethod · 0.45

Tested by

no test coverage detected