Class FileHelper
java.lang.Object
com.github.blutorange.maven.plugin.closurecompiler.common.FileHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilegetAbsoluteFile(File basedir, File file) If the file does not refer to an absolute path, return the file relative to the given basedir.static FilegetAbsoluteFile(File basedir, String file) static FileSames asFileUtils.getFile(File, String...), but ignores empty names.Processes the includes and excludes relative to the given base directory, and returns all included files.static StringrelativizePath(File base, File target)
-
Method Details
-
relativizePath
- Returns:
- The path of the given
target, relative to the specifiedbasefile. - Throws:
IOException
-
getFile
Sames asFileUtils.getFile(File, String...), but ignores empty names. -
getAbsoluteFile
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
-
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 includesexcludes- List of specified excludes- Returns:
- A list of all files matching the given includes and excludes.
-