MCPcopy Create free account
hub / github.com/MhmRdd/NoHello / saveToFile

Method saveToFile

module/src/main/cpp/PropertyManager.cpp:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42bool PropertyManager::saveToFile() {
43 std::ofstream file(filePath, std::ios::trunc);
44 if (!file.is_open()) {
45 LOGE("PropertyManager: Could not open %s for saving.", filePath.c_str());
46 return false;
47 }
48
49 for (const auto& [key, value] : orderedProps) {
50 file << key << "=" << value << '\n';
51 }
52
53 file.close();
54 return true;
55}
56
57std::string PropertyManager::getProp(const std::string& key, const std::string& defaultValue) {
58 auto it = keyIndex.find(key);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected