Skip to main content

expand_for_each

Function expand_for_each 

Source
pub fn expand_for_each(plan: &mut Plan, cwd: &Path) -> Result<()>
Expand description

Expand a plan’s for_each block: match files via glob, apply exclude/filter, substitute template variables into each operation, and flatten the result into plan.operations. After this call, plan.for_each is None.

Template variables: {path}, {item} (alias of {path}), {dir}, {stem}, {ext}, {name}.

Doubled braces ({{ / }}) are treated as escape sequences and produce literal { / } in the output. For example, {{path}} becomes the literal string {path} rather than being substituted with the file path.