method
Mime.of
Mime.of(path) -> string
Returns the MIME type inferred from the file extension (e.g. hero.png → image/png), or application/octet-stream for an unknown extension. A pure lookup — it does not open the file.
Parameters
paththe path or filenameExample
program MimeOf {
entry {
if Mime.of("hero.png") == "image/png" { print(1) }
}
}