code: public static StringBuffer sanitizePath(String input) {
      StringBuffer buf = new StringBuffer();
  
      // Strip any surrounding quotation marks, that might have came with the file name from
      // any external source like the Windows environment variable.
      if (input.matches("^\".+\"$")) {
        input = input.substring(1, input.length() - 1);
      }
  
      // Make sure we use "/" as the path separator, seems to be the best solution. Also, strip double
      // "\\" used as separators.
      input = input.replaceAll("\\\\\\\\", "/");
      input = input.replaceAll("\\\\", "/");
  
      buf.append(input);
      return buf;
    }
docs: Sanitize the given filename/path, so that (1) it is not surrounded with quotation marks "", (2)
  all occurences of "\\" are changed to a "/", and (3) all occurences of "\" are changed to a
  "/".
  
  @param input the input path
  @return a StringBuffer containing the sanitized input path