Lasso Soft Inc. > Home

[ dir->eachDirPathRecursive ]

Method

The [dir->eachDirPathRecursive] method returns a list of all directories and sub-directories contained in the directory that the [dir] object represents.

  • Syntax
local(d) = dir(...)
#d->eachDirPathRecursive
Examples
  • Intermediate

Count the total number of directories in the web-root

The code below counts up the number of directories and sub-directories that are contained in the web-root. For purposes of this example, assume that web-root has the following directories, each with 1 sub-directory: 'css', 'img', and 'js'.

Code

local(web_root)  = dir('/')
with d in #web_root->eachDirPathRecursive
sum 1

Result

6

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