How can I use pathlib to recursively iterate over all subdirectories of a given directory?
p = Path(\'docs\') for child in p.iterdir(): child
You can use the glob method of a Path object:
Path
p = Path('docs') for i in p.glob('**/*'): print(i.name)