Fork me on GitHub

PathUtils

In package com.mitchellbosecke.pebble.utils

public final class PathUtils extends Object

Utility class to handle relative paths.

Fields

public static final Pattern PATH_SEPARATOR_REGEX

Methods

public static String resolveRelativePath(String relativePath, String anchorPath, char expectedSeparator)

Resolves the given {@code relativePath} based on the given {@code anchorPath}.

Parameters:
  • String relativePath

    the relative path which should be resolved.

  • String anchorPath

    the anchor path based on which the relative path should be resolved on.

  • char expectedSeparator

    The character expected to be used as a separator; dictated by the Loader.