Class PathMapping
- java.lang.Object
-
- hudson.plugins.project_inheritance.util.PathMapping
-
public class PathMapping extends Object
-
-
Constructor Summary
Constructors Constructor Description PathMapping(String srcDir, Set<String> srcFiles, String target)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getRelativePath(String targetPath, String basePath, String pathSeparator)
Get the relative path from one file to another, specifying the directory separator.static String
getSafePath(String in)
static boolean
isAbsolute(String path)
static boolean
isPathSingleton(String path)
static boolean
isUnixPath(String path)
static String
join(String front, String end)
static Map.Entry<String,String>
splitPath(String path)
-
-
-
Method Detail
-
isUnixPath
public static boolean isUnixPath(String path)
-
isPathSingleton
public static boolean isPathSingleton(String path)
-
isAbsolute
public static boolean isAbsolute(String path)
-
getRelativePath
public static String getRelativePath(String targetPath, String basePath, String pathSeparator)
Get the relative path from one file to another, specifying the directory separator. If one of the provided resources does not exist, it is assumed to be a file unless it ends with '/' or '\'.- Parameters:
targetPath
- targetPath is calculated to this filebasePath
- basePath is calculated from this filepathSeparator
- directory separator. The platform default is not assumed so that we can test Unix behaviour when running on Windows (for example)- Returns:
- a relativized path. May be empty, but never null.
-
-