code: @NullSafe
    public static String createPath(String... pathElements) {
      String fileSeparator = (SystemUtils.isWindows() ? WINDOWS_FILE_SEPARATOR : File.separator);
  
      StringBuilder buffer = new StringBuilder(fileSeparator);
  
      for (String pathElement : ArrayUtils.nullSafeArray(pathElements, String.class)) {
        if (StringUtils.hasText(pathElement)) {
          buffer.append(fileSeparator).append(pathElement.trim());
        }
      }
  
      String fileSeparatorPattern = (SystemUtils.isWindows() ? WINDOWS_FILE_SEPARATOR_PATTERN
        : UNIX_FILE_SEPARATOR_PATTERN);
  
      return buffer.toString().replaceAll(fileSeparatorPattern, fileSeparator);
    }
docs: Creates a file system path with the given array of path elements delimited by {@link File#separator}.
  
  @param pathElements array of path elements used to construct a file system path.
  @return an absolute file system pathname composed of the individual path elements
  from the given array delimited by the {@link File#separator}.
  @see java.io.File#separator