Systems

vmimetypes

Guesses a file’s MIME type from its extension.

Released v1.0.0 · 2026-09-28
Import
use "stdlib/mimetypes.ven"

Guesses a file's MIME type from its filename extension, built on Venutian's own path handling builtin together with a small, fixed lookup table. It covers common, everyday file extensions such as text, image and archive formats, rather than the full registry of MIME types a browser or a mail server might need.

vmimetypes.ven
print guess_type("report.pdf")
Reference (2 functions)

API reference

guess_type(filename)

Guesses a MIME type Text from filenames extension.

guess_type("report.pdf")

guess_type_known(filename)

Same guess as guess_type, but tells a real match apart from a guessed default.

guess_type_known("photo.png")

Get notified when vmimetypes changes

Get notified about

New versions and security advisories.

New and updated packages, once a day.

News on the math model built in Venutian.