PyDocs

Nav

File and Directory Access

Path.iterdir

pathlib

method of Path (source)
  • Path.iterdir()
Yield path objects of the directory contents.

The children are yielded in arbitrary order, and the
special entries '.' and '..' are not included.
1 Example
>>> p = Path('docs')
>>> for child in p.iterdir(): child
...
PosixPath('docs/conf.py')
PosixPath('docs/_templates')
PosixPath('docs/make.bat')
PosixPath('docs/index.rst')
PosixPath('docs/_build')
PosixPath('docs/_static')
PosixPath('docs/Makefile')
from the Python docs
See Also
No see-alsos for pathlib/Path.iterdir
0 Notes
No notes for Path.iterdir