xdgConfigDirs

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

Examples

auto dataConfigGuard = EnvGuard("XDG_CONFIG_DIRS");

auto newConfigDirs = ["/usr/local/config", "/usr/config"];

environment["XDG_CONFIG_DIRS"] = "/usr/local/config:/usr/config";
assert(xdgConfigDirs() == newConfigDirs);
assert(equal(xdgConfigDirs("menus"), newConfigDirs.map!(p => buildPath(p, "menus"))));

environment.remove("XDG_CONFIG_DIRS");
assert(xdgConfigDirs() == ["/etc/xdg"]);
assert(equal(xdgConfigDirs("autostart"), ["/etc/xdg"].map!(p => buildPath(p, "autostart"))));

Meta