/** * Test whether all contents of the specified directory must be excluded. * @param path the path to check. * @return whether all the specified directory's contents are excluded. */ /* package */ boolean contentsExcluded(final TokenizedPath path) { return Stream.of(excludePatterns) .filter(p -> p.endsWith(SelectorUtils.DEEP_TREE_MATCH)) .map(TokenizedPattern::withoutLastToken) .anyMatch(wlt -> wlt.matchPath(path, isCaseSensitive())); }