pub fn recursivecmd<P, R, L>(
nam: &str,
opt_noerr: i32,
opt_recurse: i32,
opt_safe: i32,
args: &[String],
dirpre_func: P,
dirpost_func: R,
leaf_func: L,
) -> i32Expand description
Direct port of recursivecmd(char *nam, int opt_noerr, int opt_recurse, int opt_safe, char **args, RecurseFunc dirpre_func, RecurseFunc dirpost_func, RecurseFunc leaf_func, void *magic) from Src/Modules/files.c:378.
C body (c:381-446): walk argv, dispatch each via recursivecmd_doone.
The dirsav-based chdir-back stack (c:396-399, c:438-446) is omitted
in the Rust port — std::fs operations take absolute paths so the
chdir dance C uses to safely descend isn’t needed.
WARNING: param names don’t match C — Rust=(opt_noerr, opt_recurse, opt_safe, args, dirpre_func, dirpost_func, leaf_func) vs C=(nam, opt_noerr, opt_recurse, opt_safe, args, dirpre_func, dirpost_func, leaf_func, magic)