#include <iostream>
#include <fstream>
#include <string>
#include <stdexcept>
#include <consolix/utils/json_utils.hpp>
#include <consolix/utils/path_utils.hpp>
Go to the source code of this file.
|
std::string | read_file (const std::string &file_path) |
| Читает содержимое файла в строку.
|
|
void | write_file (const std::string &file_path, const std::string &content) |
| Записывает строку в файл.
|
|
int | main () |
|
◆ main()
◆ read_file()
std::string read_file |
( |
const std::string & | file_path | ) |
|
Читает содержимое файла в строку.
- Parameters
-
- Returns
- Содержимое файла как строка.
- Exceptions
-
std::runtime_error | Если файл не удалось открыть. |
Definition at line 12 of file test_strip_json_comments.cpp.
◆ write_file()
void write_file |
( |
const std::string & | file_path, |
|
|
const std::string & | content ) |
Записывает строку в файл.
- Parameters
-
file_path | Путь к файлу. |
content | Строка для записи. |
- Exceptions
-
std::runtime_error | Если файл не удалось открыть. |
Definition at line 24 of file test_strip_json_comments.cpp.