Package com.sas.lsaf.client.utils
Class RelativePathUtility
- java.lang.Object
-
- com.sas.lsaf.client.utils.RelativePathUtility
-
public abstract class RelativePathUtility extends java.lang.Object
Utility class to generate a relative path for a file relative to the provided base path. Note relative paths are only supported within jobs.
-
-
Constructor Summary
Constructors Constructor Description RelativePathUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getAbsolutePath(java.lang.String basePath, java.lang.String relativePath)
static java.lang.String
getName(java.lang.String path)
Return the name of the file or folder denoted by this path.static java.lang.String
getParentPath(java.lang.String path)
Return the path to the parent folder for this file or folder path.static java.lang.String
getRelativePath(java.lang.String basePath, java.lang.String absolutePath)
Generate a relative path for a file relative to the base path.
-
-
-
Method Detail
-
getRelativePath
public static java.lang.String getRelativePath(java.lang.String basePath, java.lang.String absolutePath)
Generate a relative path for a file relative to the base path.- Parameters:
basePath
- Base container location.absolutePath
- Absolute path of the file to make relative to the base path.- Returns:
- Relative path of the file relative to the base path
-
getAbsolutePath
public static java.lang.String getAbsolutePath(java.lang.String basePath, java.lang.String relativePath)
-
getParentPath
public static java.lang.String getParentPath(java.lang.String path)
Return the path to the parent folder for this file or folder path.- Parameters:
path
- the path to use- Returns:
- the path to the parent folder for this file or folder.
-
getName
public static java.lang.String getName(java.lang.String path)
Return the name of the file or folder denoted by this path.- Parameters:
path
- the path use- Returns:
- The name of the file or folder denoted by this path.
-
-