Expand description
File type detection and metadata extraction.
detect_mime sniffs the first bytes of a file for its true MIME type,
regardless of file extension. FileMetadata carries optional width,
height, and duration extracted from common formats.
Structs§
- File
Info - Detected MIME type and optional media metadata.
Functions§
- detect_
mime - Detect MIME type from file bytes using magic-byte signatures.
- file_
info - Extract all available metadata from file bytes.
- file_
info_ from_ path - Extract metadata from a file on disk without loading it fully into memory.