Serving parts of the local file system.
|:: (MonadIO m, HttpM' m, SendM m)|
|=> (FilePath -> m ())|
Handler to invoke in case of directory.
|-> (FilePath -> m ())|
Handler to invoke in case of regular files.
Directory to serve.
|-> m ()|
Dispatch based on file type; regular files or directories. The first handler specified will be invoked in case the resource to be served is an directory, the second handler otherwise. The path from the request URI will be appended to the directory resource specified as a parameter, this new path will be used to lookup the real resource on the file system. Every request will be jailed in the specified directory resource to prevent users from requesting arbitrary parts of the file system.