module Hakyll.Core.Provider
(
Internal.Provider
, newProvider
, Internal.resourceList
, Internal.resourceExists
, Internal.resourceFilePath
, Internal.resourceModified
, Internal.resourceModificationTime
, Internal.resourceString
, Internal.resourceLBS
, Internal.resourceMetadata
, Internal.resourceBody
) where
import qualified Hakyll.Core.Provider.Internal as Internal
import qualified Hakyll.Core.Provider.MetadataCache as Internal
import Hakyll.Core.Store (Store)
newProvider :: Store
-> (FilePath -> IO Bool)
-> FilePath
-> IO Internal.Provider
newProvider store ignore directory = do
p <- Internal.newProvider store ignore directory
mapM_ (Internal.resourceInvalidateMetadataCache p) $
filter (Internal.resourceModified p) $ Internal.resourceList p
return p