8 releases

0.4.0 Apr 19, 2024
0.3.3 Apr 19, 2021
0.3.2 Jun 14, 2020
0.3.0 May 23, 2020
0.1.0 May 13, 2020

#116 in Unix APIs

Download history 1094/week @ 2024-07-03 1413/week @ 2024-07-10 1484/week @ 2024-07-17 1471/week @ 2024-07-24 1382/week @ 2024-07-31 2964/week @ 2024-08-07 1489/week @ 2024-08-14 956/week @ 2024-08-21 995/week @ 2024-08-28 818/week @ 2024-09-04 861/week @ 2024-09-11 862/week @ 2024-09-18 1073/week @ 2024-09-25 899/week @ 2024-10-02 816/week @ 2024-10-09 417/week @ 2024-10-16

3,361 downloads per month
Used in 5 crates

Apache-2.0

105KB
2K SLoC

crates.io docs.rs Build

xdg-mime-rs

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.

Documentation.

Installation

Add the following to your Cargo.toml file:

[dependencies]
xdg-mime = "^0.3"

or install cargo-edit and call:

cargo add xdg-mime@0.3

Copyright 2020 Emmanuele Bassi

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

Dependencies

~1–1.7MB
~30K SLoC