Function mimeAppsListPaths

Find all known mimeapps.list files locations. Found paths are not checked for existence.

string[] mimeAppsListPaths() nothrow @safe;

This function is Freedesktop only.

Returns

Paths of mimeapps.list files in the system.

See Also

File name and location

Example

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

auto configHomeGuard = EnvGuard("XDG_CONFIG_HOME", "/home/user/config");
auto configDirsGuard = EnvGuard("XDG_CONFIG_DIRS", "/etc/xdg");

assert(mimeAppsListPaths() == [
    "/home/user/config/mimeapps.list", "/home/user/data/applications/mimeapps.list", "/etc/xdg/mimeapps.list",
    "/usr/local/data/applications/mimeapps.list", "/usr/data/applications/mimeapps.list"
]);