Function brane_shr::input::input_path
source · pub fn input_path(
prompt: impl ToString,
default: Option<impl Into<PathBuf>>,
history: Option<impl History<String>>,
) -> Result<PathBuf, Error>
Expand description
Prompts the user for an input path.
While input()
can be used too, this function features auto-completion for the filesystem.
§Arguments
prompt
: The prompt to display to the user.default
: Any default path to give, or elseNone
.history
: An optionalHistory
-capabable struct that can be used to keep track of this prompt’s history.
§Returns
The user’s chosen path.
§Errors
This function errors if we failed to interact with the user.