Class FileUtils

java.lang.Object
org.verapdf.core.utils.FileUtils

public final class FileUtils extends Object
Version:
0.1 Created 17 Apr 2017:21:52:05
Author:
Carl Wilson carlwilson AT github
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • 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