Gio.content_type_guess
function content_type_guess(filename: String, data: ByteArray): [return_value: String, result_uncertain: Boolean] { // Gjs wrapper for g_content_type_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.
- filename
a string, or null
- data
a stream of data, or null
- return_value
a string indicating a guessed content type for the given data. Free with GLib.free
- result_uncertain
return location for the certainty of the result, or null