Skip to content

fiction.serveDir

Generates static route for each file in $1 and generates HTML file tree for the directory (optional)

Terminal window
fiction.serveDir "<directory>" "<routePrefix?>" "<download?>" "<show file tree?>"
ArgumentDescriptionTypeRequired
$1Directorydirectorytrue
$2Add prefix to generated file route, e.g. <prefix>/<filename>stringfalse
$3Sets each file’s content type to application/x-octet-stream, making it automatically downloadablebooleanfalse
$4Generates HTML file tree of directory on <prefix>booleanfalse