new(server, root, options={}, default=Config::FileHandler) public

Creates a FileHandler servlet on server that serves files starting at directory root

If options is a Hash the following keys are allowed:

:AcceptableLanguages

Array of languages allowed for accept-language

:DirectoryCallback

Allows preprocessing of directory requests

:FancyIndexing

If true, show an index for directories

:FileCallback

Allows preprocessing of file requests

:HandlerCallback

Allows preprocessing of requests

:HandlerTable

Maps file suffixes to file handlers. DefaultFileHandler is used by default but any servlet can be used.

:NondisclosureName

Do not show files matching this array of globs

:UserDir

Directory inside ~user to serve content from for /~user requests. Only works if mounted on /

If options is true or false then :FancyIndexing is enabled or disabled respectively.

Show source
Register or log in to add new notes.