Library: Util
Package: Configuration
Header: Poco/Util/FilesystemConfiguration.h
An implementation of AbstractConfiguration that stores configuration data in a directory hierarchy in the filesystem.
Every period-separated part of a property name is represented as a directory in the filesystem, relative to the base directory. Values are stored in files named "data".
All changes to properties are immediately persisted in the filesystem.
For example, a configuration consisting of the properties
logging.loggers.root.channel.class = ConsoleChannel logging.loggers.app.name = Application logging.loggers.app.channel = c1 logging.formatters.f1.class = PatternFormatter logging.formatters.f1.pattern = [%p] %t
is stored in the filesystem as follows:
logging/ loggers/ root/ channel/ class/ data ("ConsoleChannel") app/ name/ data ("Application") channel/ data ("c1") formatters/ f1/ class/ data ("PatternFormatter") pattern/ data ("[%p] %t")
Direct Base Classes: AbstractConfiguration
All Base Classes: Poco::RefCountedObject, AbstractConfiguration
Member Functions: clear, enumerate, getRaw, keyToPath, removeRaw, setRaw
Inherited Functions: createView, duplicate, enumerate, expand, getBool, getDouble, getInt, getRaw, getRawString, getString, has, hasOption, hasProperty, keys, parseBool, parseInt, referenceCount, release, remove, removeRaw, setBool, setDouble, setInt, setRaw, setRawWithEvent, setString
FilesystemConfiguration(
const std::string & path
);
Creates a FilesystemConfiguration using the given path. All directories are created as necessary.
void clear();
Clears the configuration by erasing the configuration directory and all its subdirectories and files.
void enumerate(
const std::string & key,
Keys & range
) const;
bool getRaw(
const std::string & key,
std::string & value
) const;
Poco::Path keyToPath(
const std::string & key
) const;
void removeRaw(
const std::string & key
);
void setRaw(
const std::string & key,
const std::string & value
);