| 375 | } |
| 376 | |
| 377 | bool 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 | |
| 393 | bool FileUtils::writeValueVectorToFile(const ValueVector& vecData, std::string_view fullPath) const |
| 394 | { |
no test coverage detected