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

#220 in Unix APIs

Download history 955/week @ 2024-08-26 897/week @ 2024-09-02 862/week @ 2024-09-09 840/week @ 2024-09-16 1131/week @ 2024-09-23 870/week @ 2024-09-30 804/week @ 2024-10-07 630/week @ 2024-10-14 297/week @ 2024-10-21 389/week @ 2024-10-28 452/week @ 2024-11-04 335/week @ 2024-11-11 354/week @ 2024-11-18 259/week @ 2024-11-25 378/week @ 2024-12-02 318/week @ 2024-12-09

1,369 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