Yields the given path, if it exists.
(self, path, exists=False)
| 524 | return select_recursive |
| 525 | |
| 526 | def select_exists(self, path, exists=False): |
| 527 | """Yields the given path, if it exists. |
| 528 | """ |
| 529 | if exists: |
| 530 | # Optimization: this path is already known to exist, e.g. because |
| 531 | # it was returned from os.scandir(), so we skip calling lstat(). |
| 532 | yield path |
| 533 | elif self.lexists(path): |
| 534 | yield path |
| 535 | |
| 536 | |
| 537 | class _StringGlobber(_GlobberBase): |