FileResource

This might belong in another module, but it represents a file with a mime type and some data. Document implements this interface with type = text/html (see Document.contentType for more info) and data = document.toString, so you can return Documents anywhere web.d expects FileResources.

Members

Functions

getData
immutable(ubyte)[] getData()

the data

Properties

contentType
string contentType [@property getter]

the content-type of the file. e.g. "text/html; charset=utf-8" or "image/png"

filename
string filename [@property getter]

filename, return null if none

See Also

Meta