pub fn name(path: &str) -> Option<String>
Extract the file stem (name without extension) from a path.
use optic_file::name; assert_eq!(name("foo.txt"), Some("foo".into())); assert_eq!(name("/path/to/bar.txt"), Some("bar".into()));