Package org.codehaus.mojo.natives.util
Class FileUtil
- java.lang.Object
-
- org.codehaus.mojo.natives.util.FileUtil
-
public class FileUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description FileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static File[]
breakPaths(String paths)
static File
getRelativeFile(File workingDirectory, File targetFile)
Returns a relative path for the targetFile relative to the base directory.static String
truncatePath(String path, String baseDirectory)
-
-
-
Method Detail
-
getRelativeFile
public static File getRelativeFile(File workingDirectory, File targetFile)
Returns a relative path for the targetFile relative to the base directory.- Parameters:
canonicalBase
- base directory as returned by File.getCanonicalPath()targetFile
- target file- Returns:
- relative path of target file. Returns targetFile if there were no commonalities between the base and the target
-
-