MCPcopy Create free account
hub / github.com/comaps/comaps / GetFileDownloadUrl

Function GetFileDownloadUrl

libs/platform/downloader_utils.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23{
24
25std::string GetFileDownloadUrl(std::string const & fileName, int64_t dataVersion, uint64_t diffVersion /* = 0 */)
26{
27 if (diffVersion == 0)
28 return url::Join(MAPS_BASE_URL, MAP_SERIES, strings::to_string(dataVersion), url::UrlEncode(fileName));
29
30 return url::Join(kDiffsPath, MAP_SERIES, strings::to_string(dataVersion), strings::to_string(diffVersion),
31 url::UrlEncode(fileName));
32}
33
34std::string GetFilePathByUrl(std::string const & url)
35{

Callers 5

GetRelativeUrlMethod · 0.85
MakeUrlListLegacyMethod · 0.85
UNIT_TESTFunction · 0.85

Calls 3

to_stringFunction · 0.85
UrlEncodeFunction · 0.85
JoinFunction · 0.50

Tested by 1

UNIT_TESTFunction · 0.68