use parse-mime
simplify path method