get_dir_name

Function get_dir_name 

Source
pub fn get_dir_name<T: Debug + Display>(arg_string_path: &T) -> Option<String>
Expand description

Returns a string or None which is the path to the current working directory

§Arguments

  • arg_string_path: string-like

§Examples

let result = match get_dir_name( &“/A/B/C” ) { Some( string_result ) => { string_result } None => { panic!( “Failed to get dirname.” ) } }; // result = “/A/B”