Plugin LS Dir
Use this wiki plugin to list files in a directory. LS comes from the shell command ls for listing file information. See also PluginLocalFiles.
Parameters
List files in a directory. Access is denied unless system preference wikiplugin_fileaccess_allowed_paths defines allowed base paths.Introduced in Tiki 1. Required parameters are in
bold.Go to the source code
Preferences required: wikiplugin_lsdir
| Parameters | Accepted Values | Description | Default | Since |
|---|---|---|---|---|
dir |
Path to a server-local directory. Must be within one of the allowed base paths configured in preference wikiplugin_fileaccess_allowed_paths. | 1 | ||
filter |
Only list files with file names that contain this filter. Example: .jpg |
1 | ||
limit |
digits | Maximum amount of files to display. Default is no limit. | 0 | 1 |
urlprefix |
url | Make the file name a link to the file by adding the URL path preceding the file
name. Example: http://example.org/tiki/ |
1 | |
sort |
(blank) name size atime ctime mtime |
Set the sort order of the file list | name | 1 |
Example
Copy to clipboard
{lsdir dir="/lib/" urlprefix="http://localhost" sort="name" filter=".php" limit="5"}