List of usage examples for org.apache.commons.io FilenameUtils equals
public static boolean equals(String filename1, String filename2, boolean normalized, IOCase caseSensitivity)
From source file:com.github.neio.filesystem.paths.DirectoryPath.java
@Override protected boolean amIEqual(Directory path) { return FilenameUtils.equals(super.path, path.getPath(), true, IOCase.SYSTEM); }
From source file:org.pentaho.platform.repository.RepositoryFilenameUtils.java
/** * Checks whether two filenames are equal exactly. * <p/>// w w w . jav a 2s .c om * No processing is performed on the filenames other than comparison, thus this is merely a null-safe * case-sensitive equals. * * @param filename1 * the first filename to query, may be null * @param filename2 * the second filename to query, may be null * @return true if the filenames are equal, null equals null * @see org.apache.commons.io.IOCase#SENSITIVE */ public static boolean equals(final String filename1, final String filename2) { return FilenameUtils.equals(filename1, filename2, false, IOCase.SENSITIVE); }
From source file:org.pentaho.platform.repository.RepositoryFilenameUtils.java
/** * Checks whether two filenames are equal after both have been normalized. * <p/>/* w w w .j a v a 2 s . c om*/ * Both filenames are first passed to {@link #normalize(String)}. The check is then performed in a case-sensitive * manner. * * @param filename1 * the first filename to query, may be null * @param filename2 * the second filename to query, may be null * @return true if the filenames are equal, null equals null * @see IOCase#SENSITIVE */ public static boolean equalsNormalized(String filename1, String filename2) { return FilenameUtils.equals(filename1, filename2, true, IOCase.SENSITIVE); }