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. Note: This function will allocate every time it's called if no generic icon explicitly set.

class MimeType
@safe nothrow const pure
string
getGenericIcon
()

Examples

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");

Meta