Class FilenameUtils

    • Constructor Detail

    • Method Detail

      • sanitize

        public static String sanitize​(String filename)
        Sanitize a file name, i.e. replace illegal characters with the '_' character.
        This does not prevent from creating file names forbidden by the OS such as "con", "com1", "..", "prn", ".", "aux", "nul"...
        Parameters:
        filename - The file name to sanitize
        Returns:
        The sanitized file name