Function MimeType.getGenericIcon

Get generic icon name. The difference from genericIcon property is that this function provides default generic icon name if no explicitly set. The default form is media part of MIME type name with '-x-generic' appended.

string getGenericIcon() pure nothrow @safe const;

Note

This function will allocate every time it's called if no generic icon explicitly set.

Example

auto mimeType = new MimeType("text/mytype");
assert(mimeType.genericIcon.length == 0);
assert(mimeType.getGenericIcon() == "text-x-generic");
mimeType.genericIcon = "mytype";
assert(mimeType.getGenericIcon() == "mytype");
assert(mimeType.genericIcon == "mytype");