code: @Override
    public APersistenceHandler.PersistenceUri persist(boolean doOverwrite) throws DDFException {
      if (this.getDDF() == null) throw new DDFException("DDF cannot be null");
  
      String dataFile = this.getDataFileName();
      String schemaFile = this.getSchemaFileName();
  
      try {
        if (!doOverwrite && (Utils.fileExists(dataFile) || Utils.fileExists(schemaFile))) {
          throw new DDFException("DDF already exists in persistence storage, and overwrite option is false");
        }
      } catch (IOException e) {
        throw new DDFException(e);
      }
  
      try {
        this.getDDF().beforePersisting();
  
        //if overwrite and existed
        if (doOverwrite && (Utils.fileExists(dataFile) || Utils.fileExists(schemaFile))) {
          if(Utils.fileExists(dataFile)) Utils.deleteFile(dataFile);
          if(Utils.fileExists(schemaFile)) Utils.deleteFile(schemaFile);
        }
  
        Utils.writeToFile(dataFile, JsonSerDes.serialize(this.getDDF()) + '\n');
        Utils.writeToFile(schemaFile, JsonSerDes.serialize(this.getDDF().getSchema()) + '\n');
  
        this.getDDF().afterPersisting();
  
      } catch (Exception e) {
        if (e instanceof DDFException) throw (DDFException) e;
        else throw new DDFException(e);
      }
  
      return new PersistenceUri(this.getDDF().getEngine(), dataFile);
    }
docs: /*
  (non-Javadoc)
  
  @see io.ddf.content.IHandlePersistence#save(boolean)