Lasso Soft Inc. > Home

[ dir->eachFilePathRecursive ]

Method

The [dir->eachFilePathRecursive] method returns a list of all the paths to all the files contained in the directory that the [dir] object represents and all of its sub-directories.

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

Display every file path in the /css/ directory

The code below will list each file path contained in the /css/ directory. For purposes of this example, assume that the /css/ directory contains the directory 'jqueryui-themes' and the files 'messages.css', 'reset-fonts-grids.css', and 'style.css'. Also, the 'jqueryui-themes' directory contains a directory named 'redmond' which contains the file 'jquery-ui.custom.css'.

Code

local(dir_css) = dir('/css/')
with path in #dir_css->eachFilePathRecursive
do {^
    '<p>' + #path + '</p>'
^}

Result

/css/messages.css

/css/reset-fonts-grids.css

/css/style.css

/css/jqueryui-themes/redmond/jquery-ui.custom.css

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