public static String appendToPath(String pathname, final String... pathElements) {
    if (pathElements != null) {
      pathname = StringUtils.defaultIfBlank(pathname, File.separator);

      for (final String pathElement : pathElements) {
        pathname += (pathname.endsWith(File.separator) ? "" : File.separator);
        pathname += pathElement;
      }
    }

    return pathname;
  }
Gets a fully qualified path with the path elements appended to the specified pathname using the
File.separator character. If the pathname is unspecified (null, empty or blank) then path
elements are considered relative to file system root, beginning with File.separator. If array
of path elements are null, then the pathname is returned as is.

@param pathname a String value indicating the base pathname.
@param pathElements the path elements to append to pathname.
@return the path elements appended to the pathname.
@see java.io.File#separator
geode-core/src/main/java/org/apache/geode/internal/util/IOUtils.java