SEXP RGDAL_GetAccess(SEXP sxpDataset) { GDALDataset *pDataset = getGDALDatasetPtr(sxpDataset); return(ScalarLogical(pDataset->GetAccess() == GA_ReadOnly)); }
SEXP RGDAL_GetAccess(SEXP sxpDataset) { GDALDataset *pDataset = getGDALDatasetPtr(sxpDataset); int res; installErrorHandler(); res = pDataset->GetAccess() == GA_ReadOnly; uninstallErrorHandlerAndTriggerError(); return(ScalarLogical(res)); }