Type of settings struct to load
Subdirectory of settings dir to save config to. Created if nonexistent.
The filename the settings will be loaded from.
The subdirectory that the settings will be loaded from.
struct Settings { bool blah; string text; string[] texts; } auto settings = loadSettings!Settings("testapp", "settings", "subdir"); settings.texts = ["a", "b", "c"]; saveSettings(settings, "testapp", "settings", "subdir"); auto reloadedSettings = loadSettings!Settings("testapp", "settings", "subdir"); assert(reloadedSettings == settings); assert(reloadedSettings.texts == ["a", "b", "c"]);
Load settings. Will create settings file by default. Searches all system-wide settings dirs as well as the user's settings dir, and loads the first file found.