happstack-helpers-0.51: Convenience functions for Happstack.Source codeContentsIndex
Happstack.Helpers.DirBrowse
Description

Directory browsing for HAppS

browsedir "someDirectory"

Synopsis
browsedir :: MonadIO m => FilePath -> FilePath -> ServerPartT m Response
browsedirHS :: MonadIO m => FilePath -> FilePath -> ServerPartT m Response
browsedir' :: (ToMessage a, ToMessage b, MonadIO m) => (String -> [FilePath] -> a) -> (String -> String -> b) -> FilePath -> FilePath -> ServerPartT m Response
Documentation
browsedir :: MonadIO m => FilePath -> FilePath -> ServerPartT m ResponseSource

browsedir = browsedir' defPaintdir defPaintfile

define a ServerPartT value with something like

sp = browsedir "projectroot" "."

where projectroot is an alias (what you see in the url) and . is the path relative to the executable running

the happs server

browsedirHS :: MonadIO m => FilePath -> FilePath -> ServerPartT m ResponseSource

like browsedir, but haskell files are rendered through hscolour

browsedirHS = browsedir' defPaintdir hsPaintfile

browsedir' :: (ToMessage a, ToMessage b, MonadIO m) => (String -> [FilePath] -> a) -> (String -> String -> b) -> FilePath -> FilePath -> ServerPartT m ResponseSource

browsedir' paintdir paintfile diralias syspath

paintdir/paintfile are rendering functions

diralias: path that will appear in browser

syspath: real system path

Produced by Haddock version 2.6.1