applicationsPaths - multiple declarations
Function applicationsPaths
Applications paths based on data paths. This function is available on all platforms, but requires dataPaths argument (e.g. C:\ProgramData\KDE\share on Windows)
string[] applicationsPaths(Range)
(
Range dataPaths
)
if (isInputRange!Range && is(ElementType!Range : string));
Returns
Array of paths, based on dataPaths with "applications" directory appended.
Example
assert(equal(applicationsPaths(["share", buildPath("local", "share")]), [buildPath("share", "applications"), buildPath("local", "share", "applications")]));
Function applicationsPaths
ditto, but returns paths based on known data paths. This function is defined only on freedesktop systems to avoid confusion with other systems that have data paths not compatible with Desktop Entry Spec.
string[] applicationsPaths() nothrow @trusted;
Example
import std .process : environment;
auto dataHomeGuard = EnvGuard("XDG_DATA_HOME", "/home/user/data");
auto dataDirsGuard = EnvGuard("XDG_DATA_DIRS", "/usr/local/data:/usr/data");
assert(applicationsPaths() == ["/home/user/data/applications", "/usr/local/data/applications", "/usr/data/applications"]);