pandoc-2.9.2.1: Conversion between markup formats
CopyrightCopyright (C) 2011-2020 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.MIME

Description

Mime type lookup.

Synopsis

Documentation

type MimeType = Text #

getMimeType :: FilePath -> Maybe MimeType #

Determine mime type appropriate for file path.

getMimeTypeDef :: FilePath -> MimeType #

Determime mime type appropriate for file path, defaulting to “application/octet-stream” if nothing else fits.

mediaCategory :: FilePath -> Maybe Text #

Determine general media category for file path, e.g.

mediaCategory "foo.jpg" = Just "image"