• Re: how to pass a bound method to fileutil::traverse as a -prefilter

    From Ralf Fassel@21:1/5 to All on Wed Jul 23 17:27:15 2025
    * Mark Summerfield <[email protected]>
    | I want to pass a bound method to fileutil::traverse as a -prefilter.
    | I'm using `lambda` but it doesn't help. I can't work out what I'm
    | doing wrong based on the error output.
    --<snip-snip>--
    | fileutil::traverse iter -prefilter $pre_filter
    --<snip-snip>--
    | unknown option "::apply {{ignore dirname} {
    | dir_filter $ignore $dirname
    | }} {test*.* zOld}"

    man traverse(n)
    ::fileutil::traverse ?objectName? path ?option value...?

    I think you are missing the PATH argument to ::fileutil::traverse, so
    the '-prefilter' is taken as the path, and the $pre_filter as an option
    name (which does not exist, as the error message states :-)

    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Wed Jul 23 17:43:01 2025
    * Mark Summerfield <[email protected]>
    | proc dir_filter {ignores dirname} {
    | for ignore $ignores {

    Also make this a 'foreach' instead.

    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)