Lasso Soft Inc. > Home

[ dir->eachFile ]


The [dir->eachFile] method returns a list of [file] objects that reference the files immediately contained in the directory that the original [dir] object represents.

  • Syntax
local(d) = dir(...)
  • Beginner

Display each file name in the web-root

The code below outputs the file name for each file in the web-root. For purposes of the result, assume that the web-root contains the following files: 'index.lasso' and 'test.lasso'.


local(web_root) = dir('/')
with f in #web_root->eachFile
do {^
    '<p>' + #f->name + '</p>'




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