baseIconDirs - multiple declarations

Function baseIconDirs

The list of icon theme directories based on data paths.

string[] baseIconDirs(Range) (
  Range dataPaths
) @trusted
if (isInputRange!Range && is(ElementType!Range : string));

Returns

Array of paths with "icons" subdirectory appended to each data path.

Note

This function does not check if directories exist.

Example

auto dataPaths = ["share", buildPath("local", "share")];
assert(equal(baseIconDirs(dataPaths), [buildPath("share", "icons"), buildPath("local", "share", "icons")]));

Function baseIconDirs

The list of base directories where icon thems should be looked for as described in Icon Theme Specification.

string[] baseIconDirs() nothrow @safe;

This function is Freedesktop only.

Note

This function does not provide any caching of its results. This function does not check if directories exist.

Example

auto homeGuard = EnvGuard("HOME", "/home/user");
auto dataHomeGuard = EnvGuard("XDG_DATA_HOME", "/home/user/data");
auto dataDirsGuard = EnvGuard("XDG_DATA_DIRS", "/usr/local/data:/usr/data");

assert(baseIconDirs() == ["/home/user/.icons", "/home/user/data/icons", "/usr/local/data/icons", "/usr/data/icons", "/usr/share/pixmaps"]);