Expand description
MIME Type Database
Provides MIME type detection via file extension and magic byte analysis, with associated application dispatch. Used by the file manager to open files with the appropriate application.
Detection strategy:
- Magic byte signatures (most reliable, checks file header bytes)
- File extension mapping (50+ extensions supported)
- Fallback to
Unknown
The file manager calls MimeDatabase::detect_mime() to determine a file’s
MIME type, then MimeDatabase::open_with() to look up the associated
application, and finally launches that application with the file path as
an argument.
Structs§
- Mime
Association - Maps a MIME type to the application that should open it
- Mime
Database - Central database for MIME type detection and application dispatch.
Enums§
- Mime
Category - Broad category for a MIME type
- Mime
Type - Supported MIME types
Functions§
- detect_
mime_ from_ extension - Detect MIME type purely from file extension.
- get_
extension - Extract the file extension from a filename, lowercased for comparison.