public class AttributesNode extends Object
Constructor and Description |
---|
AttributesNode()
Create an empty ignore node with no rules.
|
AttributesNode(List<AttributesRule> rules)
Create an ignore node with given rules.
|
Modifier and Type | Method and Description |
---|---|
void |
getAttributes(String entryPath,
boolean isDirectory,
Map<String,Attribute> attributes)
Returns the matching attributes for an entry path.
|
List<AttributesRule> |
getRules() |
void |
parse(InputStream in)
Parse files according to gitattribute standards.
|
public AttributesNode()
public AttributesNode(List<AttributesRule> rules)
rules
- list of rules.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<AttributesRule> getRules()
public void getAttributes(String entryPath, boolean isDirectory, Map<String,Attribute> attributes)
entryPath
- the path to test. The path must be relative to this attribute
node's own repository path, and in repository path format
(uses '/' and not '\').isDirectory
- true if the target item is a directory.attributes
- Map that will hold the attributes matching this entry path. If
it is not empty, this method will NOT override any
existing entry.Copyright © 2015. All rights reserved.