Function writableMimePath

Get writable path where shared MIME database is stored.

string writableMimePath() nothrow @safe;

This function is Freedesktop only.

Returns

Writable MIME path for the current user ($HOME/.local/share/mime).

Note

this function does not check if the path exist and appears to be directory.

Example

auto dataHomeGuard = EnvGuard("XDG_DATA_HOME");

environment["XDG_DATA_HOME"] = "/home/user/data";

assert(writableMimePath() == "/home/user/data/mime");
}