public class ExclusionsFilter extends Object implements com.google.common.base.Predicate<Path>, DirectoryStream.Filter<Path>
DirectoryStream.Filter
Constructor and Description |
---|
ExclusionsFilter(Path rootPath,
List<String> excludedDirectories,
List<String> excludedExtensions,
List<String> otherPatterns) |
public ExclusionsFilter(Path rootPath, List<String> excludedDirectories, List<String> excludedExtensions, List<String> otherPatterns)
rootPath
- an absolute root path to evaluate paths againstexcludedDirectories
- directory names that will be excluded regardless of their location.excludedExtensions
- file extensions that will be excluded.otherPatterns
- regex or glob path patterns, relative to given rootPath
. Defaults to regex: if no prefix is given.FileSystem.getPathMatcher(java.lang.String)
public boolean accept(Path entry) throws IOException
accept
in interface DirectoryStream.Filter<Path>
IOException
Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.