httpd::dirlist(n) 1.1 "Tcl Web Server"

NAME

httpd::dirlist - directory handling

TABLE OF CONTENTS

    TABLE OF CONTENTS
    SYNOPSIS
    DESCRIPTION
    Public API
    SEE ALSO
    KEYWORDS
    COPYRIGHT

SYNOPSIS

package require httpd::dirlist ?1.1?

Dirlist_IndexFile pattern
Dirlist_Directory prefix path suffix sock
Dir_HideListings
Dir_ShowListings
Dir_ListingIsHidden

DESCRIPTION

The package httpd::dirlist is an adjunct to the package httpd::doc, it provides the handling of directories to it. Note that the two packages cross-reference each other, in other words they are interdependent. It might make sense to make them one package in the future.

Public API

Dirlist_IndexFile pattern
The command sets the glob pattern used by the package to locate the index file for a directory.

Dirlist_Directory prefix path suffix sock
This is the main command for the handling of directories. The name of the requested directory is in path.

The command will first try to locate an index file for the directory and failing that it will either reply with a not-found message generate a listing of the directory contents on its own, depending on whether directories are considered as hidden or not.

If an index file was found it is given back to httpd::doc for handling (Doc_Handle).

Dir_HideListings
After the call of command all requests for directories without an index file will generate not-found replies.

Dir_ShowListings
After the call of command all requests for directories without an index file will generate listings of their contents. This is also the default status for the package.

Dir_ListingIsHidden
Returns the status set by Dir_HideListings and Dir_ShowListings.

SEE ALSO

httpd, httpd::doc, httpd::doc_error, httpd::url, httpd::utils

KEYWORDS

directory, documents, filesystem, web server

COPYRIGHT

Copyright © 2003 Andreas Kupries <andreas_kupries@users.sourceforge.net>