def find_files(root_path, filter):
    result = []
    for (root, dirs, files) in os.walk(root_path):
        for file_name in files:
            if (not filter(file_name)):
                continue
            path = os.path.join(root, file_name)
            result.append(path)
    return result
def find_files(root_path, filter):
    result = []
    for (root, dirs, files) in os.walk(root_path):
        for file_name in files:
            if (not filter(file_name)):
                continue
            path = os.path.join(root, file_name)
            result.append(path)
    return result