With
from pathlib import Path
path = Path("/my/path")
for p in path.rglob("*"):
print(p)
I can get all files and directories in /my/path. How can I skip hidden files and directories?
From
file
.hidden_file
dir /
file
.hidden_file
.hidden_dir /
file
.hidden_file
I just want to get
file
dir /
file