Cherokee Web Server: Directory listing

Directory listing

The dirlist handler build the file list of a certain directory contents.

Parameters


color means a color encoded in RGB web format. For example: ff0000 for pure red.


The property list is a comma separated list. Take a look at the examples for clarification.

Examples

This basic example sets a directory up called onlysee which contents can be only browsed but isn't possible to download it:

Directory /onlysee {
    Handler dirlist
}

It isn't possible to download files because the directory is managed by the dirlist handler, and the only purpose of this handler is to list contents. If you want to allow users to download the content of the directory (which is the most common intention) you should use the Common behavior handler instead.


The next example sets a tmp directory with a blue background. The generated file list will include the size and modification date of the files:

Directory /tmp {
   Handler common {
       # Look parameters:
       # bgcolor, text, link, vlink, alink, background
       bgcolor "AACCEE"

       # Show extra information
       # Possible parameters: date, size, owner
       show size, date
                           
       # Include file if present as page header
       HeaderFile README, README.txt
   }
}

In order to avoid possible configuration file parsing problems, put the HTML color codes between quotes.