Class FilenameUtils


  • public class FilenameUtils
    extends Object
    • Field Detail

      • EXTENSION_SEPARATOR

        public static final char EXTENSION_SEPARATOR
        The extension separator character.
        See Also:
        Constant Field Values
      • EXTENSION_SEPARATOR_STR

        public static final String EXTENSION_SEPARATOR_STR
        The extension separator String.
    • Constructor Detail

      • FilenameUtils

        public FilenameUtils()
    • Method Detail

      • wildcardMatch

        public static boolean wildcardMatch​(String filename,
                                            String wildcardMatcher,
                                            IOCase caseSensitivity)
        Checks a filename to see if it matches the specified wildcard matcher allowing control over case-sensitivity.

        The wildcard matcher uses the characters '?' and '*' to represent a single or multiple wildcard characters.

        Parameters:
        filename - the filename to match on
        wildcardMatcher - the wildcard string to match against
        caseSensitivity - what case sensitivity rule to use, null means case-sensitive
        Returns:
        true if the filename matches the wilcard string