hakyll-4.9.8.0: A static website compiler library

Safe HaskellNone
LanguageHaskell98

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 #

Responsible for retrieving and listing resources

Instances

newProvider #

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 #

Check if a given resource exists

resourceModified :: Provider -> Identifier -> Bool #

A resource is modified if it or its metadata has changed

Access to raw resource content

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

Get the raw body of a resource as string

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

Get the raw body of a resource of a lazy bytestring

Access to metadata and body content