file-embed-0.0.3.1: Use Template Haskell to embed file contents directly.

Data.FileEmbed

Synopsis

Documentation

embedFile :: FilePath -> Q ExpSource

Embed a single file in your source code.

 import qualified Data.ByteString

 myFile :: Data.ByteString.ByteString
 myFile = $(embedFile "dirName/fileName")

embedDir :: FilePath -> Q ExpSource

Embed a directory recusrively in your source code.

 import qualified Data.ByteString

 myDir :: [(FilePath, Data.ByteString.ByteString)]
 myDir = $(embedDir "dirName")

getDir :: FilePath -> IO [(FilePath, ByteString)]Source

Get a directory tree in the IO monad.

This is the workhorse of embedDir