MIME type file classifier. More...
#include <mimetype.h>
Public Member Functions | |
| mimetype () | |
| Constructor. | |
| void | register_type (const std::string &ext, const std::string &mime_type) |
| Register custom MIME type. | |
| const std::string & | operator() (const std::string &filename) const |
| Operator (). | |
MIME type file classifier.
Detects the MIME type of the given file.
| const std::string& dbp::mimetype::operator() | ( | const std::string & | filename | ) | const |
Operator ().
Detects the MIME type of the given file.
is a path (or name) of the file
| void dbp::mimetype::register_type | ( | const std::string & | ext, | |
| const std::string & | mime_type | |||
| ) |
Register custom MIME type.
Registers a MIME type for a given file extension.
| ext | the file extension (without dot) | |
| mime_type | the MIME file type |