tds/src/main/java/thredds/util/StringValidateEncodeUtils.java
@SuppressWarnings({"SimplifiableIfStatement"})
  public static boolean validPath(String path) {
    if (path == null)
      return false;
    // Don't allow ".." directories in path.
    if (path.indexOf("/../") != -1 || path.equals("..")
            || path.startsWith("../") || path.endsWith("/.."))
      return false;

    return validSingleLineString(path);
  }
@SuppressWarnings({"SimplifiableIfStatement"})
  public static boolean validPath(String path) {
    if (path == null)
      return false;
    // Don't allow ".." directories in path.
    if (path.indexOf("/../") != -1 || path.equals("..")
            || path.startsWith("../") || path.endsWith("/.."))
      return false;

    return validSingleLineString(path);
  }
Return true if the given String is a valid path.
<p>
<p>
A String is considered a valid path if:
<ul>
<li> when passed to validSingleLineString(String) true is returned, and
<li> it does not contain any parent path segments ("../").</li>
</li>
</ul>

@param path the String to validate
@return true if the given String is a valid path.
@see #validSingleLineString(String)