Package utils
Class RelativePathGetter
java.lang.Object
utils.RelativePathGetter
This class is used to get the relative path of a file compared to the project path.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getRelativePath
(String absolutePath, String projectPath) Get the relative path of a file compared to the project path.
-
Constructor Details
-
RelativePathGetter
public RelativePathGetter()
-
-
Method Details
-
getRelativePath
Get the relative path of a file compared to the project path. If the project path is not a prefix of the file path, the absolute path of the file is returned.- Parameters:
absolutePath
- The absolute path of the file.projectPath
- The absolute path of the project.- Returns:
- The relative path of the file compared to the project path.
-