Function gio::content_type_guess

source ·
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.


a path, or None


a stream of data, or None


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


return location for the certainty of the result, or None