MCPcopy
hub / github.com/marimo-team/marimo / iterdir

Method iterdir

marimo/_utils/async_path.py:155–163  ·  view source on GitHub ↗

Iterate over directory contents asynchronously.

(self)

Source from the content-addressed store, hash-verified

153 # Directory operations
154
155 async def iterdir(self) -> AsyncGenerator[AsyncPath, None]:
156 """Iterate over directory contents asynchronously."""
157
158 def _iterdir() -> Iterator[Path]:
159 return self._path.iterdir()
160
161 paths = await asyncio.to_thread(list, _iterdir())
162 for path in paths:
163 yield self.__class__(path)
164
165 async def glob(self, pattern: str) -> AsyncGenerator[AsyncPath, None]:
166 """Glob for paths matching pattern asynchronously."""

Callers 10

test_iterdirMethod · 0.95
_iterdirMethod · 0.45
_has_symlinksFunction · 0.45
_has_files_recursiveMethod · 0.45
_list_directoryMethod · 0.45
test_internal_apiFunction · 0.45

Calls 1

__class__Method · 0.80

Tested by 5

test_iterdirMethod · 0.76
test_internal_apiFunction · 0.36