Package com.sas.lsaf.client.utils
Class RelativePathUtility
java.lang.Object
com.sas.lsaf.client.utils.RelativePathUtility
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetAbsolutePath(String basePath, String relativePath) static StringReturn the name of the file or folder denoted by this path.static StringgetParentPath(String path) Return the path to the parent folder for this file or folder path.static StringgetRelativePath(String basePath, String absolutePath) Generate a relative path for a file relative to the base path.
-
Constructor Details
-
RelativePathUtility
public RelativePathUtility()
-
-
Method Details
-
getRelativePath
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
-
getParentPath
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
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.
-