| Kea 3.0.2-git

io_utils.h
Go to the documentation of this file.
1// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef TEST_IO_UTILS_H
8#define TEST_IO_UTILS_H
9
10#include <string>
11#include <sys/stat.h>
12
13 namespace isc {
14 namespace test {
15
20 bool fileExists(const std::string& file_path);
21
26std::string readFile(const std::string& file_path);
27
40std::string decommentJSONfile(const std::string& input_file);
41
42} // end of isc::test namespace
43} // end of isc namespace
44
45#endif // TEST_IO_UTILS_H
isc::test
Definition env_var_wrapper.cc:12
isc::test::decommentJSONfile
std::string decommentJSONfile(const std::string &input_file)
Removes comments from a JSON file.
Definition io_utils.cc:41
isc::test::fileExists
bool fileExists(const std::string &file_path)
Checks if specified file exists.
Definition io_utils.cc:19
isc::test::readFile
std::string readFile(const std::string &file_path)
Reads contents of the specified file.
Definition io_utils.cc:24
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148