ConfigVariableFilename
-
class ConfigVariableFilename
Bases:
ConfigVariable
This is a convenience class to specialize
ConfigVariable
as a Filename type. It is almost the same thing asConfigVariableString
, except it handles an implicitFilename::expand_from()
operation so that the user may put OS-specific filenames, or filenames based on environment variables, in the prc file.Inheritance diagram
-
explicit ConfigVariableFilename(std::string const &name)
-
ConfigVariableFilename(std::string const &name, Filename const &default_value, std::string const &description = string(), int flags = 0)
-
ConfigVariableFilename(ConfigVariableFilename const&) = default
-
char const *c_str(void) const
These methods help the
ConfigVariableFilename
act like a Filename object.
-
bool empty(void) const
-
std::string get_basename(void) const
Returns the basename part of the filename. This is everything in the filename after the rightmost slash, including any extensions.
-
std::string get_basename_wo_extension(void) const
Returns the basename part of the filename, without the file extension.
-
std::string get_dirname(void) const
Returns the directory part of the filename. This is everything in the filename up to, but not including the rightmost slash.
-
std::string get_extension(void) const
Returns the file extension. This is everything after the rightmost dot, if there is one, or the empty string if there is not.
-
std::string get_fullpath(void) const
Returns the entire filename: directory, basename, extension. This is the same thing returned by the string typecast operator, so this function is a little redundant.
-
std::string get_fullpath_wo_extension(void) const
Returns the full filename–directory and basename parts–except for the extension.
-
std::size_t length(void) const
-
explicit ConfigVariableFilename(std::string const &name)