ContentType.typeGuess

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.

struct ContentType
static
string
typeGuess
(
string filename
,
char[] data
,)

Parameters

filename string

a string, or NULL

data char[]

a stream of data, or NULL

resultUncertain bool

return location for the certainty of the result, or NULL

Return Value

Type: string

a string indicating a guessed content type for the given data. Free with g_free()