diff options
Diffstat (limited to 'tcllib/modules/fileutil/cross-index-trav.inc')
-rw-r--r-- | tcllib/modules/fileutil/cross-index-trav.inc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tcllib/modules/fileutil/cross-index-trav.inc b/tcllib/modules/fileutil/cross-index-trav.inc new file mode 100644 index 0000000..a51b823 --- /dev/null +++ b/tcllib/modules/fileutil/cross-index-trav.inc @@ -0,0 +1,16 @@ +[example { + package require fileutil::traverse + + proc NoLinks {fileName} { + if {[string equal [file type $fileName] link]} { + return 0 + } + return 1 + } + + fileutil::traverse T /sys/devices -prefilter NoLinks + T foreach p { + puts $p + } + T destroy +}] |