| java.lang.Object sunlabs.brazil.template.Template sunlabs.brazil.template.DirectoryTemplate
DirectoryTemplate | public class DirectoryTemplate extends Template implements Handler(Code) | | Put current directory information (based on the URL) into the
request properties.
The <filelist> tag, if present in the document,
triggers the generation of a directory and file listing, based on the
current URL.
Template Properties:
- prepend
- String to prepend to the properties "Directories" and
"Files" That contain the directory and file lists respectively.
- delimiter
- Delimiter character to separate entries, defaults to " ".
- DirectoryName
- If set, use this as the directory name instead of
deriving it from the URL.
- debug
- if set, a comment is emitted indicating where the
file-list entitiy was encountered.
- [prepend]Directories
- List of sub-directories in current directory
- [prepend]Files
- List of files with valid suffixes in
current directory.
- mime.xxx
- An indication that suffix "xxx" is valid.
This class may also be used as a handler, in which case the
property prefix is used to match the leading
portion of a URL>
author: Stephen Uhler version: %V% DirectoryTemplate.java |
getFiles | public void getFiles(Request request, String prefix)(Code) | | Generate properties containing the files and directories in
the "current" directory. The current directory is taken from
the "DirectoryName" request property, or derived from the URL.
This functionality was culled from the FileHandler and
the Directory Handler.
|
respond | public boolean respond(Request request)(Code) | | Compute the directory info, and add it to the request properties.
|
tag_filelist | public void tag_filelist(RewriteContext hr)(Code) | | Turn on the directory calculator. The presense of this tag
causes the files and subdirectories in the current directory
to be added to the request properties.
|
|
|