public class PathHelper
extends java.lang.Object
| Constructor and Description |
|---|
PathHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
secureConcatenate(java.lang.String basePath,
java.lang.String otherPath)
Securely concatenates a base path with another path, ensuring that the resulting path does not
leave the base path.
|
public static java.lang.String secureConcatenate(java.lang.String basePath,
java.lang.String otherPath)
This method works as follows:
basePath - The base directory as a string.otherPath - The other path to concatenate with the base path.java.lang.SecurityException - if the other path attempts to leave the base directory.