Kea  2.5.3
isc::util::file Namespace Reference

Functions

string getContent (const std::string &file_name)
 Get the content of a regular file. More...
 
bool isDir (const std::string &name)
 Is a directory predicate. More...
 

Function Documentation

◆ getContent()

std::string isc::util::file::getContent ( const std::string &  file_name)

Get the content of a regular file.

Parameters
file_nameThe file name.
Returns
The content of the file_name file.
Exceptions
BadValuewhen the file can't be opened or is not a regular one.

Definition at line 23 of file file_utilities.cc.

References isc_throw.

Referenced by isc::http::BasicHttpAuthConfig::getFileContent().

◆ isDir()

bool isc::util::file::isDir ( const std::string &  name)

Is a directory predicate.

Parameters
nameThe file or directory name.
Returns
True if the name points to a directory, false otherwise including if the pointed location does not exist.

Definition at line 59 of file file_utilities.cc.

Referenced by isc::asiolink::TlsContextBase::configure(), and isc::db::MySqlConnection::openDatabase().