Skip to main content

expand_vars

Function expand_vars 

Source
pub fn expand_vars(path: &str, want_write: bool) -> Cow<'_, str>
Expand description

Expand any bound loop variable ($name / ${name}) in path to its representative list item — the read representative when want_write is false, the write representative when true. Unbound $… is left untouched (so it still fail-closes to machine). Returns path unchanged when nothing is bound.