dbp::mimetype Class Reference

MIME type file classifier. More...

#include <mimetype.h>

List of all members.

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 ().

Detailed Description

MIME type file classifier.

Detects the MIME type of the given file.


Member Function Documentation

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

Returns:
the MIME type 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.

Parameters:
ext the file extension (without dot)
mime_type the MIME file type

The documentation for this class was generated from the following file:

 
Support This Project
SourceForge.net Logo