saveSettings

Saves settings. Uses user's settings dir.

void
saveSettings
(
T
)
(,
string name
,
string filename = settingsFilename
)

Parameters

data T

The data that will be saved to the settings file.

name string

The subdirectory of the settings dir to save the config to. Created if nonexistent.

filename string

The filename the settings will be saved to.

Examples

struct Settings {
	bool blah;
	string text;
	string[] texts;
}
saveSettings(Settings(true, "some words", ["c", "b", "a"]), "testapp");

assert(loadSettings!Settings("testapp") == Settings(true, "some words", ["c", "b", "a"]));

Meta