public class AttributesRule extends Object
FastIgnoreRule
Constructor and Description |
---|
AttributesRule(String pattern,
String attributes)
Create a new attribute rule with the given pattern.
|
Modifier and Type | Method and Description |
---|---|
List<Attribute> |
getAttributes()
Return the attributes.
|
String |
getPattern()
Get the pattern
|
boolean |
isDirOnly()
Whether to match directories only
|
boolean |
isMatch(String relativeTarget,
boolean isDirectory)
Returns
true if a match was made. |
boolean |
isNameOnly()
Whether the pattern is only a file name and not a path
|
String |
toString() |
public AttributesRule(String pattern, String attributes)
pattern
- Base pattern for the attributes rule. This pattern will be
parsed to generate rule parameters. It can not be
null
.attributes
- the rule attributes. This string will be parsed to read the
attributes.public boolean isDirOnly()
true
if the pattern should match directories onlypublic List<Attribute> getAttributes()
null
)public boolean isNameOnly()
true
if the pattern is just a file name and not a
pathpublic String getPattern()
null
)public boolean isMatch(String relativeTarget, boolean isDirectory)
true
if a match was made.relativeTarget
- Name pattern of the file, relative to the base directory of
this ruleisDirectory
- Whether the target file is a directory or notCopyright © 2020 Eclipse JGit Project. All rights reserved.