Spaces:
Sleeping
Sleeping
File size: 277 Bytes
a31f9ef |
1 2 3 4 5 6 7 8 9 10 11 12 |
import os
from pathlib import Path
from typing import Generator
def get_all_files_in_all_subfolders(directory: Path) -> Generator[Path, None, None]:
for root, _, files in os.walk(directory):
for name in files:
file_path = Path(root) / name
yield file_path
|