Version 0.1
A very serious, industrial web framework in Tcl
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions
tanzer::file::handler Class Reference

Public Member Functions

 constructor opts
 resolve request route
 filter session localPath st
 serve session localPath st
 index session localPath st
 read session data
 write session

Constructor & Destructor Documentation

tanzer::file::handler::constructor   opts  

The following values should be specified in a list of key-value pairs in $opts:

  • listings

    A boolean indicating whether directory listings should be enabled. Default value is 0.

  • index

    A list of index files to look for when serving a request for a directory path. The first item in this list found is served. Default value is a single element, index.html.

  • filters

    A list of key-value pairs indicating special filters to apply to files whose base names match a regular expression in the key portion of each pair, and a command prefix which is called with the following values appended:

    • $session

      A reference to the originating session

    • $localPath

      A string containing the local path of the file to be transformed

    • $st

      A dict of data as returned by [file stat]

In order to facilitate service of file hierarchies, the file request handler should be bound to a wildcard glob route path, such as /foo/*.

Member Function Documentation

tanzer::file::handler::resolve   request route  

Not intended for use as a public method.

Given the path component of the request URI in $request, and the parts of the path that match everything at and after any possible * glob portion of the path glob in $route, determine the location of the local file to be served.

The documentation for this class was generated from the following file: