|  | Kea 3.0.0
    | 
| Classes | |
| struct | Path | 
| Paths on a filesystem.  More... | |
| class | PathChecker | 
| Embodies a supported path against which file paths can be validated.  More... | |
| struct | TemporaryDirectory | 
| Typedefs | |
| typedef boost::shared_ptr< PathChecker > | PathCheckerPtr | 
| Defines a pointer to a PathChecker. | |
| Functions | |
| bool | exists (const std::string &path) | 
| Check if there is a file or directory at the given path. | |
| string | getContent (const std::string &file_name) | 
| Get the content of a regular file. | |
| mode_t | getPermissions (const std::string path) | 
| Fetches the file permissions mask. | |
| bool | hasPermissions (const std::string path, const mode_t &permissions) | 
| Check if there if file or directory has the given permissions. | |
| bool | isDir (const std::string &path) | 
| Check if there is a directory at the given path. | |
| bool | isFile (const std::string &path) | 
| Check if there is a file at the given path. | |
| bool | isSocket (const std::string &path) | 
| Check if there is a socket at the given path. | |
| void | setUmask () | 
| Set umask (at least 0027 i.e. no group write and no other access). | |
| typedef boost::shared_ptr<PathChecker> isc::util::file::PathCheckerPtr | 
Defines a pointer to a PathChecker.
Definition at line 298 of file filesystem.h.
| bool isc::util::file::exists | ( | const std::string & | path | ) | 
Check if there is a file or directory at the given path.
| path | The path being checked. | 
Definition at line 49 of file filesystem.cc.
Referenced by getContent().
| std::string isc::util::file::getContent | ( | const std::string & | file_name | ) | 
Get the content of a regular file.
| file_name | The file name. | 
| BadValue | when the file can't be opened or is not a regular one. | 
Definition at line 32 of file filesystem.cc.
References exists(), isc_throw, and isFile().
Referenced by isc::http::BasicHttpAuthConfig::getFileContent(), and isc::d2::TSIGKeyInfoParser::parse().
| mode_t isc::util::file::getPermissions | ( | const std::string | path | ) | 
Fetches the file permissions mask.
| path | The path being checked. | 
Definition at line 55 of file filesystem.cc.
Referenced by hasPermissions().
| bool isc::util::file::hasPermissions | ( | const std::string | path, | 
| const mode_t & | permissions ) | 
Check if there if file or directory has the given permissions.
| path | The path being checked. | 
| permissions | mask of expected permissions. | 
Definition at line 65 of file filesystem.cc.
References getPermissions().
Referenced by isc::util::file::PathChecker::pathHasPermissions().
| bool isc::util::file::isDir | ( | const std::string & | path | ) | 
Check if there is a directory at the given path.
| path | The path being checked. | 
Definition at line 70 of file filesystem.cc.
Referenced by isc::asiolink::TlsContextBase::configure(), and isc::db::MySqlConnection::openDatabase().
| bool isc::util::file::isFile | ( | const std::string & | path | ) | 
Check if there is a file at the given path.
| path | The path being checked. | 
Definition at line 79 of file filesystem.cc.
Referenced by getContent(), isc::db::MySqlConnection::initializeSchema(), and isc::db::PgSqlConnection::initializeSchema().
| bool isc::util::file::isSocket | ( | const std::string & | path | ) | 
Check if there is a socket at the given path.
| path | The path being checked. | 
Definition at line 88 of file filesystem.cc.
| void isc::util::file::setUmask | ( | ) | 
Set umask (at least 0027 i.e. no group write and no other access).
Definition at line 97 of file filesystem.cc.
Referenced by main().