Class ExcludedDirectories
java.lang.Object
org.ek9lang.core.ExcludedDirectories
Single source of truth for directory names that should be excluded from
workspace file walks, watch registrations, and glob-based source discovery.
All callers that need to skip build outputs, VCS directories, or IDE caches should delegate here rather than maintaining their own exclusion sets.
-
Method Summary
Modifier and TypeMethodDescriptionDerive glob exclude patterns suitable for use withGlob(List, List).static booleanisExcludedPath(Path path) True when ANY path element ofpathis an excluded directory (build output, VCS, IDE cache) pershouldSkip(String).static booleanshouldSkip(String directoryName) True when a directory with this name should be skipped during file walks.
-
Method Details
-
shouldSkip
True when a directory with this name should be skipped during file walks. Returns true for names that start with.(hidden directories) or that appear in the built-in exclusion set.Returns false for null or empty names (defensive — root path components can produce these).
-
isExcludedPath
True when ANY path element ofpathis an excluded directory (build output, VCS, IDE cache) pershouldSkip(String). This is THE whole-path counterpart toshouldSkip(String): use it to.filter(p -> !ExcludedDirectories.isExcludedPath(p))the results of a recursiveFiles.walk(Path, int, FileVisitOption...)so generated sources undertarget/, VCS metadata under.git/, and IDE caches are never returned — the single-nameshouldSkipcannot see them once a walk has already descended past the excluded directory.Returns false for null.
-
asGlobExcludes
Derive glob exclude patterns suitable for use withGlob(List, List). For each excluded nameXthis produces both"X/"(root-level) and"**/X/**"(nested) so thatOsSupport.getFilesRecursivelyFrom(File, Glob)skips files inside those directories.Also includes
".*/**"and"**/.*/**"to catch all hidden directories (matching thestartsWith(".")logic inshouldSkip(String)).
-