Package io.pebbletemplates.pebble.utils
Class PathUtils
java.lang.Object
io.pebbletemplates.pebble.utils.PathUtils
Utility class to handle relative paths.
- Author:
- Thomas Hunziker
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
resolveRelativePath
(String relativePath, String anchorPath, char expectedSeparator) Resolves the givenrelativePath
based on the givenanchorPath
.
-
Field Details
-
PATH_SEPARATOR_REGEX
-
-
Method Details
-
resolveRelativePath
public static String resolveRelativePath(String relativePath, String anchorPath, char expectedSeparator) Resolves the givenrelativePath
based on the givenanchorPath
.- Parameters:
relativePath
- the relative path which should be resolved.anchorPath
- the anchor path based on which the relative path should be resolved on.expectedSeparator
- The character expected to be used as a separator; dictated by the Loader.- Returns:
- the resolved path or
null
when the path could not be resolved.
-