Yield path objects of the directory contents. The children are yielded in arbitrary order, and the special entries '.' and '..' are not included.
>>> 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')
pathlib/Path.iterdir
Path.iterdir