DesktopFile.this - multiple declarations

Function DesktopFile.this

Reads desktop file from file.

this (
  string fileName,
  DesktopFile.DesktopReadOptions options = DesktopReadOptions(ReadOptions(cast(DuplicateGroupPolicy)cast(ubyte)0u, cast(DuplicateKeyPolicy)cast(ubyte)0u, cast(InvalidKeyPolicy)cast(ubyte)0u, cast(Flag)true), cast(UnknownGroupPolicy)cast(ubyte)0u, cast(ExtensionGroupPolicy)cast(ubyte)1u, cast(ActionGroupPolicy)cast(ubyte)1u)
) @trusted;

Throws

ErrnoException if file could not be opened. inilike.file.IniLikeReadException if error occured while reading the file or "Desktop Entry" group is missing.

Function DesktopFile.this

Reads desktop file from IniLikeReader, e.g. acquired from iniLikeFileReader or iniLikeStringReader.

this(IniLikeReader) (
  IniLikeReader reader,
  DesktopFile.DesktopReadOptions options = DesktopReadOptions.init,
  string fileName = null
);

this(IniLikeReader) (
  IniLikeReader reader,
  string fileName,
  DesktopFile.DesktopReadOptions options = DesktopReadOptions.init
);

Throws

inilike.file.IniLikeReadException if error occured while parsing or "Desktop Entry" group is missing.

Function DesktopFile.this

Constructs DesktopFile with "Desktop Entry" group and Version set to 1.1

this() @safe;

Example

auto df = new DesktopFile();
assert(df.desktopEntry());
assert(df.desktopEntry().escapedValue("Version") == "1.1");
assert(df.categories().empty);
assert(df.type() == DesktopFile.Type.Unknown);