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

Function build_url

src/networkfilemanager.cpp:2280–2293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2278}
2279
2280static std::string build_url(PJ_CONTEXT *ctx, const char *name) {
2281 if (!nfm_is_tilde_slash(name) && !nfm_is_rel_or_absolute_filename(name) &&
2282 !starts_with(name, "http://") && !starts_with(name, "https://")) {
2283 std::string remote_file(proj_context_get_url_endpoint(ctx));
2284 if (!remote_file.empty()) {
2285 if (remote_file.back() != '/') {
2286 remote_file += '/';
2287 }
2288 remote_file += name;
2289 }
2290 return remote_file;
2291 }
2292 return name;
2293}
2294
2295// ---------------------------------------------------------------------------
2296

Callers 2

proj_is_download_neededFunction · 0.85
proj_download_fileFunction · 0.85

Calls 5

nfm_is_tilde_slashFunction · 0.85
starts_withFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected