1--------------------------------------------------------------------------------
2-- | This module provides an wrapper API around the file system which does some
4module Hakyll.Core.Provider
5 ( -- * Constructing resource providers
9 -- * Querying resource properties
10 , Internal.resourceList
11 , Internal.resourceExists
12 , Internal.resourceFilePath
13 , Internal.resourceModified
14 , Internal.resourceModificationTime
16 -- * Access to raw resource content
17 , Internal.resourceString
18 , Internal.resourceLBS
20 -- * Access to metadata and body content
21 , Internal.resourceMetadata
22 , Internal.resourceBody
26--------------------------------------------------------------------------------
27import qualified Hakyll.Core.Provider.Internal as Internal
28import qualified Hakyll.Core.Provider.MetadataCache as Internal
29import Hakyll.Core.Store (Store)
32--------------------------------------------------------------------------------
33-- | Create a resource provider
34newProvider :: Store -- ^ Store to use
35 -> (FilePath -> Bool) -- ^ Should we ignore this file?
36 -> FilePath -- ^ Search directory
37 -> IO Internal.Provider -- ^ Resulting provider
38newProvider store ignore directory = do
39 -- Delete metadata cache where necessary
40 p <- Internal.newProvider store ignore directory
41 mapM_ (Internal.resourceInvalidateMetadataCache p) $
42 filter (Internal.resourceModified p) $ Internal.resourceList p
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list