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

Method select_wildcard

Lib/glob.py:431–448  ·  view source on GitHub ↗
(path, exists=False)

Source from the content-addressed store, hash-verified

429 select_next = self.selector(parts)
430
431 def select_wildcard(path, exists=False):
432 try:
433 entries = self.scandir(path)
434 except OSError:
435 pass
436 else:
437 for entry, entry_name, entry_path in entries:
438 if match is None or match(entry_name):
439 if dir_only:
440 try:
441 if not entry.is_dir():
442 continue
443 except OSError:
444 continue
445 entry_path = self.concat_path(entry_path, self.sep)
446 yield from select_next(entry_path, exists=True)
447 else:
448 yield entry_path
449 return select_wildcard
450
451 def recursive_selector(self, part, parts):

Callers

nothing calls this directly

Calls 4

scandirMethod · 0.95
concat_pathMethod · 0.95
matchFunction · 0.85
is_dirMethod · 0.45

Tested by

no test coverage detected