directory_listing {microCRAN}R Documentation

Directory listing

Description

Creates a simple HTML page with table of all files and subdirectories. May throw a 403 or 404 code.

Usage

directory_listing(req, res, path, path_prefix)

directory_listing_html(path, url_path, add_dir = TRUE)

Arguments

req, res

A "request"- and "response"-object, respectively

path

Path to directory to list

path_prefix

Optional URL-component, if the repository exists at a subdirectory of the host (see run's path). Here, it is only for decorative purposes.

url_path

The entire, relative path, that is displayed to end user in the URL.

add_dir

Logical, if the requested URL does not end with a '/', set this to TRUE, else all links will point to the parent directory.

Value

directory_listing returns the response-object. directory_listing_html returns a HTML-string with the entire page.


[Package microCRAN version 0.9.0-1 Index]