def find_file_in_path()

in datasets/city_health_dashboard/pipelines/_images/run_csv_transform_kub/csv_transform.py [0:0]


def find_file_in_path(root_path: str, pattern: str = "*") -> typing.List[str]:
    logging.info(f"Searching for files ({pattern}) in {root_path}")
    result = []
    for root, dirs, files in os.walk(root_path):
        for name in files:
            if fnmatch.fnmatch(name, pattern):
                result.append(os.path.join(root, name))
            else:
                pass
    return result