I might be missing some subtlety here but the new `Path` provides `.extension` [`.extension_str`] for this: `file.extension_str() == Some("html")`.