veeshi / xdg-mime-rs

Rust crate for querying the shared-mime-info database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool Build


Xdg-mime-rs is a library that parses the shared-mime-info database and allows querying it to determine the MIME type of a file from its extension or from its contents.

Xdg-mime-rs is a complete re-implementation of the xdgmime C library, with some added functionality that typically resides in higher level components, like determining the appropriate icon name for a file from the icon theme.



Add the following to your Cargo.toml file:

xdg-mime = "^0.3"

or install cargo-edit and call:

cargo add xdg-mime@0.3

Copyright and license

Copyright 2020 Emmanuele Bassi

This software is distributed under the terms of the Apache License version 2.0.

ezoic increase your site revenue


Rust crate for querying the shared-mime-info database

License:Apache License 2.0


Language:Rust 99.8%Language:Shell 0.2%