Copyright | Copyright (C) 2011-2024 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Mime type lookup.
Synopsis
- type MimeType = Text
- getMimeType :: FilePath -> Maybe MimeType
- getMimeTypeDef :: FilePath -> MimeType
- getCharset :: MimeType -> Maybe Text
- extensionFromMimeType :: MimeType -> Maybe Text
- mediaCategory :: FilePath -> Maybe Text
Documentation
getMimeTypeDef :: FilePath -> MimeType Source #
Determime mime type appropriate for file path, defaulting to “application/octet-stream” if nothing else fits.