Use Path.rglob (substitutes the leading ** in Path().glob("**/*")):
path = Path("docs")
for p in path.rglob("*"):
print(p.name)
Use Path.rglob (substitutes the leading ** in Path().glob("**/*")):
path = Path("docs")
for p in path.rglob("*"):
print(p.name)