def all_paths()

in scancode/scanCode.py [0:0]


def all_paths(root_dir):
    """Generator that returns files with known extensions that can be scanned.

    Iteration is recursive beginning at the passed root directory and
    skipping directories that are listed as exception paths.
    """
    spec = pathspec.PathSpec.from_lines(GitWildMatchPattern, exclusion_paths)
    exclusion_files_set = set(map(lambda f: os.path.join(root_dir, f), spec.match_tree(root_dir)))

    for dir_path, dir_names, files in os.walk(root_dir):
        for f in files:
            filename = os.path.join(dir_path, f)
            if filename not in exclusion_files_set:
                yield filename