public class DefaultIgnoreFileFilter extends Object implements IgnoreFileFilter
Constructor and Description |
---|
DefaultIgnoreFileFilter() |
DefaultIgnoreFileFilter(List<StringPattern> patternList)
Creates new DefaultIgnoreFileFilter and fills in patterns.
|
Modifier and Type | Method and Description |
---|---|
void |
addPattern(String pattern)
Adds a string to the list of ignore file patters using the
SimpleStringPattern.
|
void |
addPattern(StringPattern pattern)
Adds a StringPattern to the list of ignore file patters.
|
void |
clearPatterns()
Clears the list of patters.
|
static List<String> |
parseCvsIgnoreFile(File cvsIgnoreFile)
Utility method that reads the .cvsignore file and returns a list of
Strings.
|
boolean |
shouldBeIgnored(File directory,
String noneCvsFile)
A file is checked against the patterns in the filter.
|
public DefaultIgnoreFileFilter()
public DefaultIgnoreFileFilter(List<StringPattern> patternList)
patternList
- - list of objects, patterns are retrieved via the
Object.toString() method.public void addPattern(StringPattern pattern)
public void addPattern(String pattern)
public void clearPatterns()
public boolean shouldBeIgnored(File directory, String noneCvsFile)
.cvsignore
file entry.shouldBeIgnored
in interface IgnoreFileFilter
directory
- is a file object that refers to the directory the file resides
in.noneCvsFile
- is the name of the file to be checked.public static List<String> parseCvsIgnoreFile(File cvsIgnoreFile) throws IOException, FileNotFoundException
IOException
FileNotFoundException
Copyright © 2016. All rights reserved.