Kea 2.5.7
isc::util::file Namespace Reference

Functions

string getContent (const std::string &file_name)
 Get the content of a regular file.
 
bool isDir (const std::string &name)
 Check if there is a directory at the given path.
 
bool isFile (const std::string &name)
 Check if there is a file at the given path.
 

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)

Check if there is a directory at the given path.

Parameters
namethe path being checked.
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().

◆ isFile()

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

Check if there is a file at the given path.

Parameters
namethe path being checked.
Returns
True if the name points to a file, false otherwise including if the pointed location does not exist.

Definition at line 68 of file file_utilities.cc.

Referenced by isc::db::MySqlConnection::initializeSchema(), and isc::db::PgSqlConnection::initializeSchema().