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

#205 in Unix APIs

Download history 1098/week @ 2024-09-22 882/week @ 2024-09-29 829/week @ 2024-10-06 701/week @ 2024-10-13 299/week @ 2024-10-20 371/week @ 2024-10-27 452/week @ 2024-11-03 323/week @ 2024-11-10 372/week @ 2024-11-17 279/week @ 2024-11-24 364/week @ 2024-12-01 304/week @ 2024-12-08 547/week @ 2024-12-15 603/week @ 2024-12-22 585/week @ 2024-12-29 830/week @ 2025-01-05

2,613 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 [email protected]

Copyright 2020 Emmanuele Bassi

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

Dependencies

~1–1.7MB
~29K SLoC