# Directory listing

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

## Parameters

- Extra information
  - HeaderFile list of files: This option allows you to insert a file on the top on the page. It is usuallu useful to insert copyright notices or disclaimers. It accepts a list of possible files, the first one present will be used.

- Branding options
  - bgcolor "color": This option lets you specify the background color of the page
  - text "color": It sets the text color
  - link "color": Links color
  - vlink "color": Visited links color
  - alink "color": Active link color

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

- Showing / Hiding options
  - show property list: It will active the columns generation of the given properties
    - date: Modification date
    - size: File size
    - owner: File's owner name
    - group: File's owner group

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.