// Rename named dataset func (driver Driver) RenameDataset(newName, oldName string) error { cDriver := driver.cval cNewName := C.CString(newName) defer C.free(unsafe.Pointer(cNewName)) cOldName := C.CString(oldName) defer C.free(unsafe.Pointer(cOldName)) return C.GDALRenameDataset(cDriver, cNewName, cOldName).Err() }
// Rename named dataset func (driver Driver) RenameDataset(newName, oldName string) error { cDriver := driver.cval cNewName := C.CString(newName) defer C.free(unsafe.Pointer(cNewName)) cOldName := C.CString(oldName) defer C.free(unsafe.Pointer(cOldName)) err := C.GDALRenameDataset(cDriver, cNewName, cOldName) if err != 0 { return error(err) } return nil }