hakyll-4.11.0.0: A static website compiler library

Safe HaskellNone
LanguageHaskell2010

Hakyll.Core.Provider

Contents

Description

This module provides an wrapper API around the file system which does some caching.

Synopsis

Constructing resource providers

data Provider Source #

Responsible for retrieving and listing resources

newProvider Source #

Arguments

:: Store

Store to use

-> (FilePath -> IO Bool)

Should we ignore this file?

-> FilePath

Search directory

-> IO Provider

Resulting provider

Create a resource provider

Querying resource properties

resourceExists :: Provider -> Identifier -> Bool Source #

Check if a given resource exists

resourceModified :: Provider -> Identifier -> Bool Source #

A resource is modified if it or its metadata has changed

Access to raw resource content

resourceString :: Provider -> Identifier -> IO String Source #

Get the raw body of a resource as string

resourceLBS :: Provider -> Identifier -> IO ByteString Source #

Get the raw body of a resource of a lazy bytestring

Access to metadata and body content