ContentType.guess

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.

class ContentType
static
string
guess
(
string filename
,
char[] data
,)

Parameters

filename string

a string, or NULL. [allow-none]

data char[]

a stream of data, or NULL. [allow-none][array length=data_size]

resultUncertain int

return location for the certainty of the result, or NULL. [allow-none]out

Return Value

Type: string

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

Meta