guess


Description:


public string guess (string? filename, uint8[]? data, out bool result_uncertain)

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.

Parameters:

filename

a path, or null

data

a stream of data, or null

result_uncertain

return location for the certainty of the result, or null

data_size

the size of data

Returns:

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


Namespace: GLib.ContentType
Package: gio-2.0



2022 vala-language.org