code: public static LCMSDataSource<?> create(Path path) {
      path = path.toAbsolutePath();
      String lowerCaseName = path.getFileName().toString().toLowerCase();
      if (lowerCaseName.endsWith(".mzxml")) {
        return new MZXMLFile(path.toString());
      } else if (lowerCaseName.endsWith(".mzml")) {
        return new MZMLFile(path.toString());
      }
      return null;
    }
docs: Try and create a data source from a given file path.
  
  @return null if the provided path was not recognized