Package nl.basjes.gitignore
Class GitIgnore
java.lang.Object
nl.basjes.gitignore.GitIgnore
A class that holds a single .gitignore file
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbooleanignoreFile(String filename) Checks if the file matches the stored expressions.isIgnoredFile(String filename) Checks if the file matches the stored expressions.booleanChecks if the file matches the stored expressions.voidsetVerbose(boolean verbose) toString()
-
Constructor Details
-
GitIgnore
- Throws:
IOException
-
GitIgnore
- Throws:
IOException
-
GitIgnore
-
GitIgnore
-
GitIgnore
-
GitIgnore
-
-
Method Details
-
isIgnoredFile
Checks if the file matches the stored expressions.- Parameters:
filename- The filename to be checked (which is a project relative filename).- Returns:
- NULL: not matched, True: must be ignored, False: it must be UNignored
-
ignoreFile
Checks if the file matches the stored expressions. This is NOT suitable for combining multiple sets of rules!- Parameters:
filename- The filename to be checked (which is a project relative filename).- Returns:
- true: must be ignored, false: it must be not be ignored
-
keepFile
Checks if the file matches the stored expressions. This is NOT suitable for combining multiple sets of rules!- Parameters:
filename- The filename to be checked (which is a project relative filename).- Returns:
- true: must be kept, false: it must be ignored
-
setVerbose
public void setVerbose(boolean verbose) -
toString
-
getProjectRelativeBaseDir
-