svn_io_detect_mimetype2

Function svn_io_detect_mimetype2 

Source
pub unsafe extern "C" fn svn_io_detect_mimetype2(
    mimetype: *mut *const c_char,
    file: *const c_char,
    mimetype_map: *mut apr_hash_t,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Examine utf8-encoded @a file to determine if it can be described by a known (as in, known by this function) Multipurpose Internet Mail Extension (MIME) type. If so, set @a *mimetype to a character string describing the MIME type, else set it to @c NULL.

If not @c NULL, @a mimetype_map is a hash mapping const char * filename extensions to const char * MIME types, and is the first source consulted regarding @a file’s MIME type.

Use @a pool for any necessary allocations.

@since New in 1.5.