Class FilenameUtils


  • public class FilenameUtils
    extends java.lang.Object
    Utility class for manipulating filenames.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull java.lang.String quoteName​(@NotNull java.lang.String name)
      Converts a file name to a "safe" form.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • quoteName

        @NotNull
        public static @NotNull java.lang.String quoteName​(@NotNull
                                                          @NotNull java.lang.String name)
        Converts a file name to a "safe" form. The returned file name will not contain any "unsafe" characters (see UNSAFE_FILENAME_CHARACTERS), and it will not be empty.
        Parameters:
        name - the file name to convert
        Returns:
        the converted file name