Package org.openpnp.util
Class ResourceUtils
- java.lang.Object
-
- org.openpnp.util.ResourceUtils
-
public class ResourceUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResourceUtils.PathResolutionException
-
Constructor Summary
Constructors Constructor Description ResourceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetRelativePath(java.lang.String targetPath, java.lang.String basePath, java.lang.String pathSeparator)Get the relative path from one file to another, specifying the directory separator.
-
-
-
Method Detail
-
getRelativePath
public static java.lang.String getRelativePath(java.lang.String targetPath, java.lang.String basePath, java.lang.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:
target- targetPath is calculated to this filebase- basePath is calculated from this fileseparator- directory separator. The platform default is not assumed so that we can test Unix behaviour when running on Windows (for example)- Returns:
-
-