docs: public static String addToPath(String basePath, String fileName, char chFileSeparator)
      {
          if (chFileSeparator == '\0')
          {
              String strFileSeparator = System.getProperty("file.separator");
              chFileSeparator = '/';
              if ((strFileSeparator != null) && (strFileSeparator.length() == 1))
                  chFileSeparator = strFileSeparator.charAt(0);
          }
          StringBuilder sb = new StringBuilder();
          if (basePath != null)
              sb.append(basePath);
          if (sb.length() > 0)
              if (sb.charAt(sb.length() - 1) != chFileSeparator)
                  sb.append(chFileSeparator);
          if (fileName != null)
          {
              if ((fileName.length() > 0) && (fileName.charAt(0) == chFileSeparator) && (sb.length() > 0))
                  sb.append(fileName.substring(1));
              else
                  sb.append(fileName);
          }
          return sb.toString();
      }