Directory browsing for HAppS
browsedir "someDirectory"
- 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