The tag returns an array of all paths of a directory tree, in other words a directory listing including all sub directories.
It can optionally return a map instead of an array, useful when creating a faster replacement for file_exists.
Parameters
-path
string, required
The name of the directory to be listed
-type
string, optional
The name of the data type to return. Can be 'map' or 'array, defaults to 'array'
Sample Usage
js_directorytree('/config');
Returns
array: (/_config/.DS_Store), (/_config/config.inc), (/_config/config_tabs.inc)
js_directorytree('/config', -type='map');
Returns
map: (/_config/config_tabs.inc)=(), (/_config/.DS_Store)=(), (/_config/config.inc)=()
if(global('allfiles') -> type != 'map');
global('allfiles'=js_directorytree('/', -type='map')); // call this only once
/if;
$allfiles >> '/includes/menu.inc';
Returns true or false
Source Code
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.