Class ExcludedDirectories

java.lang.Object
org.ek9lang.core.ExcludedDirectories

public final class ExcludedDirectories extends Object
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 Details

    • shouldSkip

      public static boolean shouldSkip(String directoryName)
      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).

    • asGlobExcludes

      public static List<String> asGlobExcludes()
      Derive glob exclude patterns suitable for use with Glob(List, List). For each excluded name X this produces both "X/" (root-level) and "**&#47;X/**" (nested) so that OsSupport.getFilesRecursivelyFrom(File, Glob) skips files inside those directories.

      Also includes ".*&#47;**" and "**&#47;.*&#47;**" to catch all hidden directories (matching the startsWith(".") logic in shouldSkip(String)).