-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Use Template Haskell to embed file contents directly. -- -- Use Template Haskell to embed file contents directly. @package file-embed @version 0.0.4.2 module Data.FileEmbed -- | Embed a single file in your source code. -- --
-- import qualified Data.ByteString -- -- myFile :: Data.ByteString.ByteString -- myFile = $(embedFile "dirName/fileName") --embedFile :: FilePath -> Q Exp -- | Embed a directory recusrively in your source code. -- --
-- import qualified Data.ByteString -- -- myDir :: [(FilePath, Data.ByteString.ByteString)] -- myDir = $(embedDir "dirName") --embedDir :: FilePath -> Q Exp -- | Get a directory tree in the IO monad. -- -- This is the workhorse of embedDir getDir :: FilePath -> IO [(FilePath, ByteString)] dummySpace :: Int -> Q Exp inject :: ByteString -> ByteString -> Maybe ByteString injectFile :: ByteString -> FilePath -> FilePath -> IO ()