Function tree_magic::from_filepath
[−]
[src]
pub fn from_filepath(filepath: &str) -> Option<String>
Gets the type of a file from a filepath.
Does not look at file name or extension, just the contents. Returns mime as string wrapped in Some if a type matches, or None if the file is not found or cannot be opened.