Marquee Marquee::Plugin::AutoIndex - Auto index

TABLE OF CONTENTS

NAME

Marquee::Plugin::AutoIndex - Auto index

SYNOPSIS

$app->plugin('AutoIndex');

On your browser following forms of URL are available.

http://localhost:3000/path/to/directory/
http://localhost:3000/path/to/directory/?mode=tree

DESCRIPTION

This is a plugin for auto index. When app attribute default_file is undefined or the file is not found, the directory access causes the auto index to be served.

ATTRIBUTES

Marquee::Plugin::AutoIndex inherits all attributes from Marquee::Plugin and implements the following new ones.

max_per_dir

Max file amount to display in each directory, defaults to 50.

$plugin->max_per_dir(100);
my $num = $plugin->max_per_dir;

tree_depth

Max depth for directory recursion, defaults to 4.

$plugin->tree_depth(2);
my $num = $plugin->tree_depth;

INSTANCE METHODS

Marquee::Plugin::AutoIndex inherits all instance methods from Marquee::Plugin and implements the following new ones.

register

Register the plugin.

$self->register($app);

serve_index

Serves auto directory index.

$plugin->serve_index($path);

serve_tree

Serves auto directory tree.

$plugin->serve_tree($path);

SEE ALSO

Marquee, Mojolicious