get_file_extension

Function get_file_extension 

Source
pub fn get_file_extension<P>(path: &P) -> Option<&str>
where P: AsRef<Path>,
Expand description

Returns the file extension of a path.

ยงArguments

  • path - The path to extract the file extension from.

Returns None if the source path terminates in .. or is /.