MCPcopy Index your code
hub / github.com/python/cpython / iterdir

Method iterdir

Lib/importlib/resources/readers.py:80–84  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78 raise NotADirectoryError('MultiplexedPath only supports directories')
79
80 def iterdir(self):
81 children = (child for path in self._paths for child in path.iterdir())
82 by_name = operator.attrgetter('name')
83 groups = itertools.groupby(sorted(children, key=by_name), key=by_name)
84 return map(self._follow, (locs for name, locs in groups))
85
86 def read_bytes(self):
87 raise FileNotFoundError(f'{self} is not a file')

Callers 1

Calls 1

groupbyMethod · 0.80

Tested by

no test coverage detected