wai-app-static-0.2.0: WAI application for static serving

Network.Wai.Application.Static

Contents

Description

Static file serving for WAI.

Synopsis

Generic, non-WAI code

Mime types

Mime type by file extension

takeExtensions :: FilePath -> [String]Source

A list of all possible extensions, starting from the largest.

mimeTypeByExtSource

Arguments

:: MimeMap 
-> MimeType

default mime type

-> FilePath 
-> MimeType 

Finding files

File/folder metadata

getMetaDataSource

Arguments

:: FilePath

path to directory on disk containing the entry

-> FilePath

entry in that directory

-> IO (Maybe MetaData) 

look up the meta data associated with a file

Directory listings

defaultDirListing :: StaticDirListingSource

WAI application

Settings

data CacheSettings Source

Constructors

NoCache 
Forever CheckHashParam 
ETag (FilePath -> IO (Maybe ByteString))