java.lang.Object
software.xdev.testcontainers.imagebuilder.jgit.ignore.IgnoreNode

public class IgnoreNode extends Object
Represents a bundle of ignore rules inherited from a base directory.
  • Field Details

    • rules

      protected final List<FastIgnoreRule> rules
      The rules that have been parsed into this node.
  • Constructor Details

    • IgnoreNode

      public IgnoreNode(List<FastIgnoreRule> rules)
      Create an ignore node with given rules.
      Parameters:
      rules - list of rules.
  • Method Details

    • getRules

      public List<FastIgnoreRule> getRules()
      Get list of all ignore rules held by this node
      Returns:
      list of all ignore rules held by this node
    • isIgnored

      public IgnoreNode.MatchResult isIgnored(String entryPath, boolean isDirectory)
      Determine if an entry path matches an ignore rule.
      Parameters:
      entryPath - the path to test. The path must be relative to this ignore node's own repository path, and in repository path format (uses '/' and not '\').
      isDirectory - true if the target item is a directory.
      Returns:
      status of the path.
    • checkIgnored

      public Boolean checkIgnored(String entryPath, boolean isDirectory)
      Determine if an entry path matches an ignore rule.
      Parameters:
      entryPath - the path to test. The path must be relative to this ignore node's own repository path, and in repository path format (uses '/' and not '\').
      isDirectory - true if the target item is a directory.
      Returns:
      Boolean.TRUE, if the entry is ignored; Boolean.FALSE, if the entry is forced to be not ignored (negated match); or null, if undetermined
      Since:
      4.11
    • toString

      public String toString()
      Overrides:
      toString in class Object