Function
Giocontent_type_guess
since: 2.0
Declaration
gchar*
g_content_type_guess (
const gchar* filename,
const guchar* data,
gsize data_size,
gboolean* result_uncertain
)
Description
Guesses the content type based on example data. If the function is
uncertain, result_uncertain will be set to TRUE. Either filename
or data may be NULL, in which case the guess will be based solely
on the other argument.
Available since: 2.0
Parameters
filename-
Type:
const gchar*A path, or
NULL.The argument can be NULL.The data is owned by the caller of the function. The value is a file system path, using the OS encoding. data-
Type: An array of
gucharA stream of data, or
NULL.The argument can be NULL.The length of the array is specified in the data_sizeargument.The data is owned by the caller of the function. data_size-
Type:
gsizeThe size of
data. result_uncertain-
Type:
gboolean*Return location for the certainty of the result, or
NULL.The argument will be set by the function. The argument can be NULL.