MimeType.addParent

Add parent type for this MIME type. Adding a duplicate does nothing.

class MimeType
@safe nothrow pure
void
addParent
(
string parent
)

Examples

auto mimeType = new MimeType("text/html");
mimeType.addParent("text/xml");
mimeType.addParent("text/plain");
mimeType.addParent("text/xml");
assert(mimeType.parents == ["text/xml", "text/plain"]);
mimeType.clearParents();
assert(mimeType.parents().empty);

Meta