Creates the file in the given version folder, with the full path as file contents. Returns the full path.
| 199 | |
| 200 | // Creates the file in the given version folder, with the full path as file contents. Returns the full path. |
| 201 | inline std::string createSettingsFile(const IApplicationContext& context, const std::string& versionFolder, const std::string& filename) |
| 202 | { |
| 203 | auto settingsFolder = os::standardPathWithSlash(context.getSettingsPath() + versionFolder); |
| 204 | os::makeDirectory(settingsFolder); |
| 205 | auto fullPath = settingsFolder + filename; |
| 206 | |
| 207 | std::ofstream stream(fullPath); |
| 208 | |
| 209 | stream << fullPath; |
| 210 | stream.flush(); |
| 211 | stream.close(); |
| 212 | |
| 213 | return fullPath; |
| 214 | } |
| 215 | |
| 216 | inline std::string loadSettingsFile(const IApplicationContext& context, const std::string& applicationVersion, const std::string& relativeFilePath) |
| 217 | { |
no test coverage detected