nu_engine::env

Function current_dir_const

Source
pub fn current_dir_const(
    working_set: &StateWorkingSet<'_>,
) -> Result<PathBuf, ShellError>
👎Deprecated since 0.92.3: please use EngineState::cwd() instead
Expand description

Returns the current working directory, which is guaranteed to be canonicalized.

Returns an error if $env.PWD doesn’t exist, is not a String, or is not an absolute path.