xdgAllConfigDirs

Undocumented in source. Be warned that the author may not have intended to support it.
  1. string[] xdgAllConfigDirs(string subfolder)
  2. string[] xdgAllConfigDirs(string subfolder)
    @trusted nothrow
    static if(isFreedesktop)
    string[]
    xdgAllConfigDirs
    (
    string subfolder = null
    )

Examples

auto homeGuard = EnvGuard("HOME");
auto configHomeGuard = EnvGuard("XDG_CONFIG_HOME");
auto configDirsGuard = EnvGuard("XDG_CONFIG_DIRS");

auto newConfigHome = "/home/myuser/data";
environment["XDG_CONFIG_HOME"] = newConfigHome;
auto newConfigDirs = ["/usr/local/data", "/usr/data"];
environment["XDG_CONFIG_DIRS"] = "/usr/local/data:/usr/data";

assert(xdgAllConfigDirs() == newConfigHome ~ newConfigDirs);

environment.remove("XDG_CONFIG_HOME");
environment.remove("HOME");

assert(xdgAllConfigDirs() == newConfigDirs);

Meta