MimeDetectorFromCache

Implementation of mime.detector.IMimeDetector interface using mmappable mime.cache files.

Constructors

this
this(Range mimeCaches)

Constructor based on existing MIME cache objects.

this
this(Range mimePaths)

Constructor based on MIME paths. It automatically load mime.cache files from given paths.

Members

Functions

isSubclassOf
bool isSubclassOf(const(char)[] mimeType, const(char)[] parent)
Undocumented in source. Be warned that the author may not have intended to support it.
mimeCaches
const(MimeCache[]) mimeCaches()

Get mime.cache.MimeCache objects.

mimeTypeForData
const(char)[] mimeTypeForData(const(void)[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
mimeTypeForFileName
const(char)[] mimeTypeForFileName(const(char)[] fileName)
Undocumented in source. Be warned that the author may not have intended to support it.
mimeTypeForNamespaceURI
const(char)[] mimeTypeForNamespaceURI(const(char)[] namespaceURI)
Undocumented in source. Be warned that the author may not have intended to support it.
mimeTypesForData
const(char[])[] mimeTypesForData(const(void)[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
mimeTypesForFileName
const(char[])[] mimeTypesForFileName(const(char)[] fileName)
Undocumented in source. Be warned that the author may not have intended to support it.
resolveAlias
const(char)[] resolveAlias(const(char)[] aliasName)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From IMimeDetector

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

The preferable mime type for fileName.

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.

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

The preferable mime type for data.

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.

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

Get real name of mime type by alias.

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

Check if mimeType is subclass of parent.

Meta