pub fn content_type_guess(
    filename: Option<impl AsRef<Path>>,
    data: &[u8]
) -> (GString, bool)
Expand 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 None, in which case the guess will be based solely on the other argument.

filename

a path, or None

data

a stream of data, or None

Returns

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

result_uncertain

return location for the certainty of the result, or None