Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides access to files bundled with the current executable.
To bundle files within an executable, use the accompanying embedtool
command line tool, or the functions provided in Data.Embed.File.
To embed a directory of data files with an executable, try:
embedtool -p1 -w my_executable my_data_dir
- myBundle :: Bundle
- embeddedFile :: FilePath -> Maybe ByteString
- embeddedFile' :: FilePath -> ByteString
Documentation
Handle to this application's embedded file bundle. Throws an error upon evaluation if the application has none.
embeddedFile :: FilePath -> Maybe ByteString Source
Returns the specified embedded file, or Nothing if it does not exist or this executable has no embedded file bundle.
embeddedFile' :: FilePath -> ByteString Source
Like embeddedFile
, but throws an error if the given file does not exist
in the executable's embedded file bundle.