code: func (d *DirPreferences) Save() error {
  	f, err := os.Create(d.Path)
  	if err != nil {
  		return err
  	}
  
  	defer f.Close()
  
  	enc := json.NewEncoder(f)
  	return enc.Encode(d)
  }
docs: // Save writes the DirPreferences values to the file in the struct's Path
  // field