MCPcopy Create free account
hub / github.com/OSGeo/PROJ / open

Method open

src/networkfilemanager.cpp:255–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253// ---------------------------------------------------------------------------
254
255std::unique_ptr<DiskChunkCache> DiskChunkCache::open(PJ_CONTEXT *ctx) {
256 if (!pj_context_get_grid_cache_is_enabled(ctx)) {
257 return nullptr;
258 }
259 const auto cachePath = pj_context_get_grid_cache_filename(ctx);
260 if (cachePath.empty()) {
261 return nullptr;
262 }
263
264 auto diskCache =
265 std::unique_ptr<DiskChunkCache>(new DiskChunkCache(ctx, cachePath));
266 if (!diskCache->initialize())
267 diskCache.reset();
268 return diskCache;
269}
270
271// ---------------------------------------------------------------------------
272

Callers 3

readMethod · 0.45
proj_is_download_neededFunction · 0.45
proj_download_fileFunction · 0.45

Calls 14

pj_logFunction · 0.85
proj_context_errno_setFunction · 0.85
GetNewRetryDelayFunction · 0.85
sleep_msFunction · 0.85
pj_emscripten_read_rangeFunction · 0.85
resetMethod · 0.80
sizeMethod · 0.80
emptyMethod · 0.45
initializeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected