MimeType.getIcon

Get icon name. The difference from icon property is that this function provides default icon name if no explicitly set. The default form is MIME type name with '/' replaces with '-'. Note: This function will allocate every time it's called if no icon explicitly set.

class MimeType
@safe nothrow const pure
string
getIcon
()

Examples

auto mimeType = new MimeType("text/mytype");
assert(mimeType.icon.length == 0);
assert(mimeType.getIcon() == "text-mytype");
mimeType.icon = "mytype";
assert(mimeType.getIcon() == "mytype");
assert(mimeType.icon == "mytype");

Meta