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

Function GetFilePathsToLoadFromKmb

libs/map/bookmark_helpers.cpp:489–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489std::vector<std::string> GetFilePathsToLoadFromKmb(std::string const & filePath)
490{ // Convert input file and save to temp KML with unique name.
491 auto kmlData = LoadKmlFile(filePath, KmlFileType::Binary);
492 if (kmlData == nullptr)
493 return {};
494
495 auto fileSavePath = GenerateValidAndUniqueFilePathForKML(base::FileNameFromFullPath(filePath));
496 if (!SaveKmlFileByExt(*kmlData, fileSavePath))
497 return {};
498 return {std::move(fileSavePath)};
499}
500
501std::vector<std::string> GetFilePathsToLoadFromGpx(std::string const & filePath)
502{ // Copy input file to temp GPX with unique name.

Callers 1

Calls 4

LoadKmlFileFunction · 0.85
FileNameFromFullPathFunction · 0.85
SaveKmlFileByExtFunction · 0.85

Tested by

no test coverage detected