MCPcopy Create free account
hub / github.com/axmolengine/axmol / writeValueMapToFile

Method writeValueMapToFile

core/platform/FileUtils.cpp:377–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377bool FileUtils::writeValueMapToFile(const ValueMap& dict, std::string_view fullPath) const
378{
379 pugi::xml_document doc;
380 doc.load_string(R"(<?xml version="1.0" encoding="UTF-8" ?>
381<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
382<plist />)",
383 pugi::parse_full);
384
385 auto rootEle = doc.document_element();
386
387 generateElementForDict(dict, rootEle);
388 std::stringstream ss;
389 doc.save(ss, " ");
390 return writeStringToFile(ss.str(), fullPath);
391}
392
393bool FileUtils::writeValueVectorToFile(const ValueVector& vecData, std::string_view fullPath) const
394{

Callers 1

FileUtilsTests.cppFile · 0.80

Calls 7

generateElementForDictFunction · 0.85
getInstanceFunction · 0.85
load_stringMethod · 0.80
document_elementMethod · 0.80
saveMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected