Skip to main content

expand_input

Function expand_input 

Source
pub fn expand_input(
    input: &str,
    options: &ExpandOptions,
) -> Result<PathBuf, PathError>
Expand description

Expand user path input according to options.

Pipeline:

  1. Optional trim
  2. Optional WSL translation (before other expansion when enabled)
  3. Optional tilde expansion
  4. Optional percent and dollar variable expansion (with depth limit)

§Filesystem access

Home directory resolution may consult environment variables / platform APIs via the dirs crate. No other filesystem I/O is performed.

§Security

Expanded environment values are untrusted input. Do not treat expansion as path validation or containment.