Write text or JSON data to a file. More...
#include <Malena/Utilities/FileWriter.h>
Static Public Member Functions | |
| static bool | writeJson (const std::string &path, const json &data, int indent=4) |
Serialize data to a pretty-printed JSON file. | |
| static bool | writeText (const std::string &path, const std::string &text) |
| Write a raw string to a file, overwriting any existing content. | |
Write text or JSON data to a file.
Definition at line 25 of file FileWriter.h.
|
static |
Serialize data to a pretty-printed JSON file.
true on success, false if the file could not be opened.
|
static |
Write a raw string to a file, overwriting any existing content.
true on success, false if the file could not be opened.