1import fnmatch
2import os
3from typing import List
4
5
6def find_files(pattern, path) -> List[str]:
7 """Takes a shell pattern and a path and returns a list of file path strings"""
8 result: List[str] = []
9 for root, dirs, files in os.walk(path):
10 for name in files:
11 if fnmatch.fnmatch(name, pattern):
12 result.append(os.path.join(root, name))
13 return result
14