Skip to main content

extension

Function extension 

Source
pub fn extension(path: &str, fmt: PathFormat) -> &str
Expand description

Get the extension (last “.ext” including the dot).

Matches Python pathlib’s rule: see file_stem for the detailed criteria. The extension is empty for names with no dot, names starting with a dot (.hidden), and names ending with a dot (foo.).