MediaSubtypeXmlStore

Implementation of mime.store.IMimeStore interface that uses MEDIA/SUBTYPE.xml files from mime/ subfolder to read MIME types. It does not read any MIME type definitions at the construction time. Instead MediaSubtypeXmlStore performs parsing of separate files on demand when calling mimeType or byMimeType. All parsed definitions are getting cached to avoid re-parsing on every demand.

Constructors

this
this(const(string)[] mimePaths)

Members

Functions

byMimeType
InputRange!(const(MimeType)) byMimeType()

Lazily read MIME types objects. The list of MIME types is read from mime/types file, so it must be present.

mimeType
Rebindable!(const(MimeType)) mimeType(char[] name)

Find and parse MEDIA/SUBTYPE.xml file(s) for given MIME type name. If it finds more then one file for the MIME type, merging operation is performed.

Inherited Members

From IMimeStore

byMimeType
InputRange!(const(MimeType)) byMimeType()

All stored mime types.

mimeType
Rebindable!(const(MimeType)) mimeType(char[] name)

Get mime type for name.

See Also

Meta