pub fn get_absolute_path_or_error<T: Debug + Display>(
arg_string_path: &T,
) -> Result<String, String>Expand description
Similar to get_absolute_path() except this is ‘all-or-nothing.’ If any step fails, this returns an error message explaining which step failed. Since canonicalize requires the final path to exist, this will count as a ‘failure’ condition. This supports ‘~’, ‘.’, ‘..’
§Arguments
- arg_string_path: string-like
§Examples
let string_absolute_path = match get_absolute_path( &string_path_relative ) { Ok( string_result ) => { string_result } Err( err ) => { panic!( “{}”, err ) } };