Lasso Soft Inc. > Home

[ dir->isEmpty ]

Method

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.

  • Syntax
local(d) = dir(...)
#d->isEmpty
Examples
  • Beginner

Determine whether a folder is empty

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!

Recent Comments

No Comments found

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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft