⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module mime

Module mime 

Source
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:

  1. Magic byte signatures (most reliable, checks file header bytes)
  2. File extension mapping (50+ extensions supported)
  3. 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§

MimeAssociation
Maps a MIME type to the application that should open it
MimeDatabase
Central database for MIME type detection and application dispatch.

Enums§

MimeCategory
Broad category for a MIME type
MimeType
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.