def _find_files_with_extension()

in build_script.py [0:0]


def _find_files_with_extension(path, extension):
    """
    In Python 3.5 and above, glob supports recursive patterns such as
    '**/*.swift'. This function backports that functionality to Python 3.4
    and below.
    """
    paths = []
    for root, _, file_names in os.walk(path):
        for file_name in fnmatch.filter(file_names, '*.{}'.format(extension)):
            paths.append(os.path.join(root, file_name))
    return paths