7#ifndef KEA_UTIL_FILESYSTEM_H
8#define KEA_UTIL_FILESYSTEM_H
32exists(
const std::string& path);
41isDir(
const std::string& path);
50isFile(
const std::string& path);
77 Path(std::string
const& path);
84 std::string
str()
const;
98 std::string
stem()
const;
140 std::string parent_path_;
146 std::string extension_;
154 std::string dir_name_;
string getContent(string const &file_name)
Get the content of a regular file.
bool isFile(string const &path)
Check if there is a file at the given path.
bool exists(string const &path)
Check if there is a file or directory at the given path.
bool isSocket(string const &path)
bool isDir(string const &path)
Check if there is a directory at the given path.
Defines the logger used by the top-level component of kea-lfc.
Path(std::string const &path)
Constructor.
Path & replaceParentPath(std::string const &replacement=std::string())
Trims {replacement} and replaces this instance's parent path with it.
std::string extension() const
Get the extension of the file.
Path & replaceExtension(std::string const &replacement=std::string())
Identifies the extension in {replacement}, trims it, and replaces this instance's extension with it.
std::string stem() const
Get the base name of the file without the extension.
std::string parentPath() const
Get the parent path.
std::string filename() const
Get the name of the file, extension included.
std::string str() const
Get the path in textual format.
RAII device to limit access of created files.
Umask(mode_t mask)
Constructor.