Expand description
Load XDG data files at runtime.
This module provides support for loading the XDG Shared Mime Info database at runtime from either the XDG directories or from specified package files.
This code directly parses the XML from the packages/
directory, instead of
the pre-parsed files created by update-mime-info
, for a few reasons:
- It’s pretty fast with quick_xml.
- There are some weirdnesses in the
globs2
file on my machines around case-sensitive matches that are not in the original source. - The same parsing code can directly load the XML from the
shared-mime-info
source repository for embedding.
Re-exports§
pub use mimeinfo::load_xdg_mime_info;
Modules§
- mimeinfo
- XDG Shared MIME Info database representation.
- xdg_
package - Types for shared-mime definitions parsed from package files.
Enums§
- XDGError
- Error type for mime-info parse failures.
Functions§
- parse_
mime_ package - Parse a single package XML file from the shared mime database.
- xdg_
mime_ search_ dirs - Return the directories to check for MIME data, in processing order.