Releases: ebassi/xdg-mime-rs
xdg-mime 0.3.3
xdg_mime 0.3.2
Quick bug fix release.
When loading the shared-mime info database from multiple locations we might end up loading the same data. When there are multiple globs matching with the same type, we might end up in a confusing situation, and break the MIME type guessing.
Bugs fixed
- #19: Unable to guess
text/turtletype
xdg_mime 0.3.1
New stable release, improving the code to be more idiomatic and less "hey, this is the first real Rust project of a C programmer".
Bugs fixed
xdg_mime 0.3.0
This is the first real stable release of the xdg_mime crate.
API changes from 0.2
- The
Guess.mime_typemethod now returns a reference to themime::Mimeinstance, instead of a copy.
New features
- The
GuessBuildertype acquired new methods to improve the MIME type detection: metadata: pass astd::fs::Metadataobject of a file; this allows us to detect directories, executable files, or empty filespath: pass aPathreference to a file; this allows us to automatically fill up the other fields when calling theguessmethod- improve content sniffing for files that do not match any glob rule, but are either empty or contain only text
- detect the
inode/symlinkMIME type
Bug fixes
- We now correctly match magic rules at the same grouping level (#13)
xdg_mime 0.2.1 (preview)
Bug fix release.
Contains a fix in the MIME content matching code which prevented, among other things, to determine the MIME type of shell scripts. See: #13
xdg_mime 0.2.0 (preview)
Another preview release of the xdg_mime crate.
The API is definitely stabler, but I reserve the right to tweak it to
conform to the Rust style guidelines, and especially in light of
feedback received from external users.
New functionality in this release
- added the
SharedMimeInfo.reloadmethod, which allows you to reload
the contents of the shared MIME database, in case it changed. This is
mostly useful for long-running processes that might end up surviving
a system update. - added the
SharedMimeInfo.guess_mime_typemethod, which allows you
to guess the MIME type of a file or a chunk of data, following the
appropriate checking algorithm outlined in the shared-mime-info
specification. - lots of improvements in the documentation, including examples.
xdg_mime 0.1.0 (preview)
Initial release of the xdg_mime crate.
You should consider this a "preview" release; the API hasn't been
finalized, yet, but I consider this the minimum safe set of symbols to
expose for the time being.
Basic functionality
- load the system shared-mime database
- get the list of possible MIME types for a file name
- get the MIME type for a chunk of data
- compare two MIME types for equality, including aliases
- look up icon names for a given MIME type
- look up all the parent types for a MIME type
Planned future improvements
- better documentation
- more examples
- an implementation of the recommended checking algorithm as
defined by the shared-mime-info specification - explicit database reloading
- memory mapped
mime.cachesupport
Further improvements
- MIME type handlers
- accessing the XML data