Class FileUtils

    • Constructor Detail

      • FileUtils

        public FileUtils()
    • Method Detail

      • extFromFileName

        public static String extFromFileName​(String filename)
      • hasExtNoCase

        public static boolean hasExtNoCase​(String fileName,
                                           String ext)
      • hasExt

        public static boolean hasExt​(String fileName,
                                     String ext)
      • addExt

        public static String addExt​(String path,
                                    String ext)
        Method to add a file extension to a given path if it doesn't have it and return the result.
        Parameters:
        path - a String that carries the file name or path to add the extension to.
        ext - the extension to add if not present, this should be the letters only, the dot separator '.' is not required.
        Returns:
        the path with the extension added