lua test.lua
(or use Shake).mimetypes.copy([db])
- Copies the default MIME types database and returns the copy. If you provide db
, it is copied instead of the default.mimetypes.guess(filename[, db])
- Guesses the MIME type of the file named filename
. If a MIME type could not be ascertained, nil is returned. If you provide db
, it is used to look up the MIME type instead of the default database.extensions
and filenames
. filenames
is checked first, as it maps literal filenames (like README
) to MIME types.extensions
. (For example, report.pdf
would look up pdf
and return the MIME type there, which is application/pdf
.)guess
without arguments, and messing with it would be a bad thing.