Skip to main content

suffix

Function suffix 

Source
pub fn suffix(path: &str) -> String
Expand description

File extension of the final component (including the dot), or empty string.

Matches Python pathlib’s rule (see crate::functions::path_parse::extension): the suffix is empty when the rightmost . is at the start of the name (.hidden) or at the end (foo.).