2e62044
1
2
3
4
5
6
7
from pathlib import Path from typing import Union def get_files(path: Union[str, Path], extension='.wav'): if isinstance(path, str): path = Path(path).expanduser().resolve() return list(path.rglob(f'*{extension}'))