MCPcopy Index your code
hub / github.com/RustPython/RustPython / select_exists

Method select_exists

Lib/glob.py:513–521  ·  view source on GitHub ↗

Yields the given path, if it exists.

(self, path, exists=False)

Source from the content-addressed store, hash-verified

511 return select_recursive
512
513 def select_exists(self, path, exists=False):
514 """Yields the given path, if it exists.
515 """
516 if exists:
517 # Optimization: this path is already known to exist, e.g. because
518 # it was returned from os.scandir(), so we skip calling lstat().
519 yield path
520 elif self.lexists(path):
521 yield path
522
523
524class _StringGlobber(_GlobberBase):

Callers

nothing calls this directly

Calls 1

lexistsMethod · 0.95

Tested by

no test coverage detected