The [dir->size]
method returns the number of items in the directory that the [dir]
object represents.
local(d) = dir(...)
#d->size
The code below displays the number of items in the web-root folder. For the example, assume that the directory contains the following contents: 'css/', 'img/', 'index.lasso', 'js/', and 'test.lasso'
Code
local(web_root) = dir('/')
#web_root->size
Result
5
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