Kea  1.9.9-git
io_utils.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2017 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 
26 std::string readFile(const std::string& file_path);
27 
40 std::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
bool fileExists(const std::string &file_path)
Checks if specified file exists.
Definition: io_utils.cc:19
std::string decommentJSONfile(const std::string &input_file)
Definition: io_utils.cc:41
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-dhcp-ddns.