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 newConfigHome = "/home/myuser/data";
auto newConfigDirs = ["/usr/local/data", "/usr/data"];

auto homeGuard = EnvGuard("HOME", "");
auto configHomeGuard = EnvGuard("XDG_CONFIG_HOME", newConfigHome);
auto configDirsGuard = EnvGuard("XDG_CONFIG_DIRS", "/usr/local/data:/usr/data");

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

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

assert(xdgAllConfigDirs() == newConfigDirs);

Meta