IMimeDetector

Interface for classes that detect mime type name from file name or data.

This interface is designed to know nothing about mime.type.MimeType, it deals only with mime type names. Implemented classes are not expected to be 'smart' (i.e. they should not do anything besides what required). See notes for member functions.

Members

Functions

isSubclassOf
bool isSubclassOf(const(char)[] mimeType, const(char)[] parent)

Check if mimeType is subclass of parent.

mimeTypeForData
const(char)[] mimeTypeForData(const(void)[] data)

The preferable mime type for data.

mimeTypeForFileName
const(char)[] mimeTypeForFileName(const(char)[] fileName)

The preferable mime type for fileName.

mimeTypeForNamespaceURI
const(char)[] mimeTypeForNamespaceURI(const(char)[] namespaceURI)
mimeTypesForData
const(char[])[] mimeTypesForData(const(void)[] data)

The list of the most preferred mime types for data. If its length is greater than 1 it means there are many mime type with same priority matching this data.

mimeTypesForFileName
const(char[])[] mimeTypesForFileName(const(char)[] fileName)

The list of the most preferred mime types for fileName. If its length is greater than 1 it means there are many mime type with same priority matching this fileName.

resolveAlias
const(char)[] resolveAlias(const(char)[] aliasName)

Get real name of mime type by alias.

Meta