Copyright | Copyright (C) 2014-2015 2017–2018 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Definition of a MediaBag object to hold binary resources, and an interface for interacting with it.
- data MediaBag
- lookupMedia :: FilePath -> MediaBag -> Maybe (MimeType, ByteString)
- insertMedia :: FilePath -> Maybe MimeType -> ByteString -> MediaBag -> MediaBag
- mediaDirectory :: MediaBag -> [(String, MimeType, Int)]
Documentation
lookupMedia :: FilePath -> MediaBag -> Maybe (MimeType, ByteString) Source #
Lookup a media item in a MediaBag
, returning mime type and contents.