| 40 | } |
| 41 | |
| 42 | bool 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 | |
| 57 | std::string PropertyManager::getProp(const std::string& key, const std::string& defaultValue) { |
| 58 | auto it = keyIndex.find(key); |
nothing calls this directly
no outgoing calls
no test coverage detected