Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern.
(self, pattern, *, recurse_symlinks=True)
| 279 | raise NotImplementedError |
| 280 | |
| 281 | def glob(self, pattern, *, recurse_symlinks=True): |
| 282 | """Iterate over this subtree and yield all existing files (of any |
| 283 | kind, including directories) matching the given relative pattern. |
| 284 | """ |
| 285 | anchor, parts = _explode_path(pattern, self.parser.split) |
| 286 | if anchor: |
| 287 | raise NotImplementedError("Non-relative patterns are unsupported") |
| 288 | elif not parts: |
| 289 | raise ValueError(f"Unacceptable pattern: {pattern!r}") |
| 290 | elif not recurse_symlinks: |
| 291 | raise NotImplementedError("recurse_symlinks=False is unsupported") |
| 292 | case_sensitive = self.parser.normcase('Aa') == 'Aa' |
| 293 | globber = _PathGlobber(self.parser.sep, case_sensitive, recursive=True) |
| 294 | select = globber.selector(parts) |
| 295 | return select(self.joinpath('')) |
| 296 | |
| 297 | def walk(self, top_down=True, on_error=None, follow_symlinks=False): |
| 298 | """Walk the directory tree from this directory, similar to os.walk().""" |
nothing calls this directly
no test coverage detected