java.lang.Object
com.github.blutorange.maven.plugin.closurecompiler.common.FileHelper

public class FileHelper extends Object
  • Method Details

    • relativizePath

      public static String relativizePath(File base, File target) throws IOException
      Returns:
      The path of the given target, relative to the specified base file.
      Throws:
      IOException
    • getFile

      public static File getFile(File directory, String... names)
      Sames as FileUtils.getFile(File, String...), but ignores empty names.
    • getAbsoluteFile

      public static File getAbsoluteFile(File basedir, File file)
      If the file does not refer to an absolute path, return the file relative to the given basedir. If the file already refers to an absolute path, return the file.
      Parameters:
      basedir - Directory to which the file is relative.
      file - File to make absolute.
    • getAbsoluteFile

      public static File getAbsoluteFile(File basedir, String file)
    • getIncludedFiles

      public static List<File> getIncludedFiles(File baseDir, List<String> includes, List<String> excludes)
      Processes the includes and excludes relative to the given base directory, and returns all included files.
      Parameters:
      baseDir - Base directory of the includes and excludes.
      includes - List of specified includes
      excludes - List of specified excludes
      Returns:
      A list of all files matching the given includes and excludes.