Class AllFilesWalker
java.lang.Object
io.github.sergeloie.languagecheck.scan.AllFilesWalker
Walks a directory tree collecting relative file paths, pruning excluded
directories and skipping excluded files via an
ExclusionMatcher.
Symbolic links are not followed: a link is never added to the result and a symlinked directory is not descended into, so the walk cannot escape the scan root.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlistFiles(File root, ExclusionMatcher matcher) List all included files underroot.
-
Constructor Details
-
AllFilesWalker
public AllFilesWalker()
-
-
Method Details
-
listFiles
List all included files underroot.- Parameters:
root- the directory to walk (typically the project root)matcher- exclusion rules; may beExclusionMatcher.none()- Returns:
- relative paths with '/' separators, in file-tree traversal order
- Throws:
IllegalArgumentException- ifrootis not an existing directory ormatcheris null
-