Function MimeCache.findMimeTypesBySuffix

Find all MIME type alternatives for fileName using suffix patterns like *.cpp. Due to mime cache format characteristics it uses output range instead of returning the input one.

void findMimeTypesBySuffix(OutRange) (
  scope const(char)[] fileName,
  OutRange sink
) const @trusted
if (isOutputRange!(OutRange, MimeTypeAlternativeByName));

Parameters

NameDescription
fileName name to match against suffix patterns.
sink output range where MimeTypeAlternativeByName objects with pattern set to suffix matching fileName will be put.

Note

pattern property of MimeTypeAlternativeByName objects will not have leading "*" to avoid allocating.