pub fn mimetype<P: AsRef<Path>>(path: P) -> Option<String>
Expand description
Try to get the mimetype of a given path.
The path doesn’t have to exist.
§Examples
let my_file = "test.txt";
let mimetype = menmos_std::fs::mimetype(my_file);
assert_eq!(mimetype, Some(String::from("text/plain")));