Class GitIgnoreParser


  • public final class GitIgnoreParser
    extends Object
    Lightweight, zero-dependency parser for .gitignore files natively inside the Maven runtime.
    • Method Detail

      • parse

        public static List<Predicate<Path>> parse​(Path gitignoreFile)
                                           throws IOException
        Parses a .gitignore file and returns a list of predicates to test paths against. The predicates are anchored to the directory of the .gitignore file.
        Parameters:
        gitignoreFile - Path to the .gitignore file.
        Returns:
        List of evaluating predicates.
        Throws:
        IOException - if the file cannot be read.