| MIME(3) | C LIBRARY FUNCTIONS | MIME(3) |
|---|
#include <mime.h>
Mime_t
{
unsigned long flags;
};
Mime_t* mimeopen(unsigned long flags);
void mimeclose(Mime_t* mime);
int mimeload(Mime_t* mime, const char* path, unsigned long flags);
int mimelist(Mime_t* mime, Sfio_t* sp, const char* pattern);
char* mimeview(Mime_t* mime, const char* view, const char* name, const char* type, const char* opts);
int mimeset(Mime_t* mime, char* line, unsigned long flags);
mimeclose closes the mime session.
mimeload loads the mime file named by path into the mime session. flags may be one of:
More than one mime file can be loaded into a session; the files are searched in load order. If path is 0 then the default mime file is loaded.
mimelist
lists the mime file contents on the
mimetype returns the type string for path. mimetype always returns a non-null string. If errors are encounterd on path then the return value will be error.
| November 07, 2006 |