Package dev.prozilla.pine.common.system
Class PathUtils
java.lang.Object
dev.prozilla.pine.common.system.PathUtils
Utility class for handling path strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
createLink
(String path) static String
normalizePath
(String path) Normalizes a path by removing prefixes and replacing separators.static String
relativizePath
(String path) static String
removeLeadingSlash
(String path) Removes a leading slash from a path if there is one.
-
Constructor Details
-
PathUtils
public PathUtils()
-
-
Method Details
-
removeLeadingSlash
Removes a leading slash from a path if there is one.- Parameters:
path
- Path with or without leading slash- Returns:
- Path without leading slash
-
normalizePath
Normalizes a path by removing prefixes and replacing separators.- Parameters:
path
- Path- Returns:
- Normalized path
-
relativizePath
-
createLink
-