DesktopFile.type

Type of desktop entry.

  1. Type type()
    class DesktopFile
    @nogc @safe const nothrow
    type
    ()
  2. Type type(Type t)

Return Value

Type: Type

Type of desktop entry.

Examples

string contents = "[Desktop Entry]\nType=Application";
auto desktopFile = new DesktopFile(iniLikeStringReader(contents));
assert(desktopFile.type == DesktopFile.Type.Application);

desktopFile.desktopEntry["Type"] = "Link";
assert(desktopFile.type == DesktopFile.Type.Link);

desktopFile.desktopEntry["Type"] = "Directory";
assert(desktopFile.type == DesktopFile.Type.Directory);

desktopFile = new DesktopFile(iniLikeStringReader("[Desktop Entry]"), ReadOptions.noOptions, ".directory");
assert(desktopFile.type == DesktopFile.Type.Directory);

Meta