Kea 2.7.5
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
13namespace isc {
14namespace test {
15
20bool 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
std::string decommentJSONfile(const std::string &input_file)
Removes comments from a JSON file.
Definition io_utils.cc:41
bool fileExists(const std::string &file_path)
Checks if specified file exists.
Definition io_utils.cc:19
std::string readFile(const std::string &file_path)
Reads contents of the specified file.
Definition io_utils.cc:24
Defines the logger used by the top-level component of kea-lfc.