/** * Determine if file is accepted, based on include and exclude * rules. Called on each file entry (file or directory) and * returns <code>true</code> if file passes search criteria. * File is matched using {@link #getMatchingFilePath(java.io.File) matching file path}. * @see jodd.util.InExRules */ protected boolean acceptFile(File file) { String matchingFilePath = getMatchingFilePath(file); return rules.match(matchingFilePath); }
/** * Determine if file is accepted, based on include and exclude * rules. Called on each file entry (file or directory) and * returns <code>true</code> if file passes search criteria. * File is matched using {@link #getMatchingFilePath(java.io.File) matching file path}. * @see InExRules */ protected boolean acceptFile(final File file) { String matchingFilePath = getMatchingFilePath(file); if (rules.match(matchingFilePath)) { if (consumers != null) { consumers.accept(file); } return true; } return false; }
/** * Determine if file is accepted, based on include and exclude * rules. Called on each file entry (file or directory) and * returns <code>true</code> if file passes search criteria. * File is matched using {@link #getMatchingFilePath(java.io.File) matching file path}. * @see InExRules */ protected boolean acceptFile(final File file) { String matchingFilePath = getMatchingFilePath(file); if (rules.match(matchingFilePath)) { if (consumers != null) { consumers.accept(file); } return true; } return false; }