Lasso Soft Inc. > Home

[ dir->eachPath ]

Method

The [dir->eachPath] method returns a list of paths contained in the directory that the [dir] object represents.

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

Display all paths in the /css/ directory

The code below will list each path to each item 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'.

Code

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

Result

/css/messages.css

/css/reset-fonts-grids.css

/css/style.css

/css/jqueryui-themes/

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