code: func (tx *Tx) CopyFile(path string, mode os.FileMode) error {
  	f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode)
  	if err != nil {
  		return err
  	}
  
  	err = tx.Copy(f)
  	if err != nil {
  		_ = f.Close()
  		return err
  	}
  	return f.Close()
  }
docs: // CopyFile copies the entire database to file at the given path.
  // A reader transaction is maintained during the copy so it is safe to continue
  // using the database while a copy is in progress.