Function tree_magic::match_filepath [] [src]

pub fn match_filepath(mimetype: &str, filepath: &str) -> Result<bool, Error>

Check if the given filepath matches the given MIME type.

Returns true or false if it matches or not, or an Error if the file could not be read. If the given mime type is not known, it will always return false.