NAME
MIME::Types - determine mime type by file extension
DESCRIPTION
A Raku library that reads the mime.types file as used by many Linux distributions, and web servers, and returns an object that can be queried by either type or extension.
SYNOPSIS
use MIME::Types;
# Specify the mime file you wisg to use
# Or don't pass anything and get the default from the 'resources' directory
my $mime = MIME::Types.new("/etc/mime.types");
my $type = $mime.type('txt'); ## Returns: 'text/plain';
my @known_extensions = $mime.extensions('application/vnd.ms-excel');
## Returns: [ 'xls', 'xlb', 'xlt' ]
EXAMPLE
An example mime.types is included in the resources/ directory, and is used by the tests in t/.
LICENCE
This is licensed under the Artistic 2.0 license
AUTHOR
Timothy Totten http://huri.net/ https://github.com/supernovus/