DesktopEntry.type

Sets "Type" field to type Note: Setting the Type.Unknown removes type field.

  1. Type type()
  2. Type type(Type t)
    class DesktopEntry
    @safe
    type

Examples

auto desktopFile = new DesktopFile();
desktopFile.type = Type.Application;
assert(desktopFile.desktopEntry.escapedValue("Type") == "Application");
desktopFile.type = Type.Link;
assert(desktopFile.desktopEntry.escapedValue("Type") == "Link");
desktopFile.type = Type.Directory;
assert(desktopFile.desktopEntry.escapedValue("Type") == "Directory");

desktopFile.type = Type.Unknown;
assert(desktopFile.desktopEntry.escapedValue("Type").empty);

Meta