MIME Type guessing by a file extension. This is a poor man's way of guessing MIME Types. It is simple and fast.
In general you don't have to use this module directly.
Documentation
parseExtMapFile :: FilePath -> IO ExtMapSource
Read an Apache mime.types and parse it.
serializeExtMap :: ExtMap -> String -> String -> StringSource
generates a
Haskell source code which contains the following things:
serializeExtMap
extMap moduleName variableName
- A definition of module named
moduleName
. -
variableName ::
whose content is a serialization ofExtMap
extMap
.
The module Network.HTTP.Lucu.MIMEType.DefaultExtensionMap is surely generated using this function.