Function MimeDatabase.mimeType

Get mime type by name or alias.

std.typecons.Rebindable!(const(mime.type.MimeType)) mimeType (
  const(char)[] nameOrAlias,
  std.typecons.Flag!("resolveAlias") resolve = cast(Flag)true
);

Parameters

NameDescription
nameOrAlias MIME type name or alias.
resolve Try to resolve alias if could not find MIME type with given name.

Returns

MimeType for given nameOrAlias, resolving alias if needed. Null if no mime type found.