Overview
| Artifact ID: | 936fee3eeab28c126296a7f5f28cd527e92ce807 |
|---|---|
| Ticket: | 1880980fffffffffffffffffffffffffffffffff
Option to [glob] to ease recursive traversal |
| User & Date: | evil_son on 2008-01-31 23:01:00 |
Changes
- icomment:
Logged In: YES user_id=1993540 Originator: YES Following up on my previous post: what if glob -walk returned a list of pairs <filename, type (i.e. file or dir)> of all directory entries except for . and .. So to print out files under a directory (without error checking or checking for empty return lists): proc allfiles {dir} { foreach pair [glob -walk -directory $dir] { foreach {entry type} $pair {break} if {$type eq "d"} { allfiles $entry } elseif {$type eq "f"} { puts $entry } } } allfiles someDir - login: "evil_son"
- mimetype: "text/plain"
- username: "evil_son"