|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.ignore.IgnoreNode
public class IgnoreNode
Represents a bundle of ignore rules inherited from a base directory. This class is not thread safe, it maintains state about the last match.
Nested Class Summary | |
---|---|
static class |
IgnoreNode.MatchResult
Result from isIgnored(String, boolean) . |
Constructor Summary | |
---|---|
IgnoreNode()
Create an empty ignore node with no rules. |
|
IgnoreNode(List<IgnoreRule> rules)
Create an ignore node with given rules. |
Method Summary | |
---|---|
List<IgnoreRule> |
getRules()
|
IgnoreNode.MatchResult |
isIgnored(String entryPath,
boolean isDirectory)
Determine if an entry path matches an ignore rule. |
void |
parse(InputStream in)
Parse files according to gitignore standards. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IgnoreNode()
public IgnoreNode(List<IgnoreRule> rules)
rules
- list of rules.Method Detail |
---|
public void parse(InputStream in) throws IOException
in
- input stream holding the standard ignore format. The caller is
responsible for closing the stream.
IOException
- Error thrown when reading an ignore file.public List<IgnoreRule> getRules()
public IgnoreNode.MatchResult isIgnored(String entryPath, boolean isDirectory)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |