Skip to content

lasselukkari/MimeTypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MimeTypes

C++ content-type utility class.

API

static const char* getType(const char * path)

Lookup the content-type associated with a file path or extension.

MimeTypes::getType("pdf");
MimeTypes::getType(".txt");
MimeTypes::getType("/images/image.png");
MimeTypes::getType("/bin/binary.BiN");

static const char* getExtension(const char * type, int skip = 0)

Get the extension for a content-type.

MimeTypes::getExtension("application/pdf");

const char * type;
int i = 0;
do  {
  type = MimeTypes::getExtension("text/plain", i++);
} while (type != NULL);

Mime data source

node-mime lite version

About

C++ content-type utility class.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages