pandoc-2.9.2: Conversion between markup formats

CopyrightCopyright (C) 2011-2019 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Text.Pandoc.MIME

Description

Mime type lookup.

Synopsis

Documentation

getMimeType :: FilePath -> Maybe MimeType Source #

Determine mime type appropriate for file path.

getMimeTypeDef :: FilePath -> MimeType Source #

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

mediaCategory :: FilePath -> Maybe Text Source #

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

mediaCategory "foo.jpg" = Just "image"