xtd 0.2.0
Loading...
Searching...
No Matches

◆ remove_all_keys() [2/2]

void xtd::configuration::file_settings::remove_all_keys ( const xtd::string section)
noexcept

Removes all key from the specified section.

Parameters
sectionThe section where all keys are removed.
Remarks
To write permanently use the xtd::configuration::file_settings::save method.
Use xtd::string::empty_string paramreter to remove all keys of the global section.
Use xtd::string::empty_string paramreter to remove key of the global section.
Examples
The following example shows how to create xtd::configuration::file_settings and use xtd::configuration::file_settings::reset, xtd::configuration::file_settings::write, xtd::configuration::file_settings::remove_all_keys and xtd::configuration::file_settings::save methods.
auto file = file_settings {"my_app.ini"};
file.reset();
file.write("main", "quit_application_on_main_form_closed", true);
file.write("pictures \"Menu\"", "file_open", "resources/symbolic_open.png");
file.write("pictures \"Menu\"", "file_save", "resources/symbolic_save.png");
file.remove_all_keys("pictures \"Menu\"");
file.save()
void reset()
Reset current settings.
Represents an object for storing and retrieving configuration information using text files in INI for...
Definition file_settings.h:32
my_app.ini:
[main]
quit_application_on_main_form_closed = true