The [dir->eachDirPath] method returns a list of directory paths contained in the directory that the [dir] object represents. The return type is a [queriable_select] which allows you to work with it in query expressions.
local(d) = dir(...)
#d->eachDirPath
The code below will display the list of directories in the web root. For purposes of the result, assume the web-root contains the following directories: 'css', 'img', and 'js'
Code
local(web_root) = dir('/')
#web_root->eachDirPath
Result
/css/, /img/, /js/
The code below will display the list of directories in the web root as an un-ordered list. For purposes of the result, assume the web-root contains the following directories: 'css', 'img', and 'js'
Code
'<ul>'
local(web_root) = dir('/')
with d in #web_root->eachDirPath
do {^
'<li>' + #d + '</li>'
^}
'</ul>'
Result
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments