The [dir->isEmpty]
method returns a boolean value of whether the directory referenced by the [dir]
object is contains no items or not. It returns true if there are no items in the directory and false if there are any items.
local(d) = dir(...)
#d->isEmpty
The code below checks to see if the directory is empty and displays a warning if it is. For the purposes of this code, assume the directory is empty.
Code
local(dir_logo) = dir('/rhino')
if(#dir_logo->isEmpty) => {^
'The Rhino is missing!'
^}
Result
The Rhino is missing!
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