gio FunctionsSynopsisgio.content_type_can_be_executabletypegio.content_type_equalstype1type2gio.content_type_from_mime_typemime_typegio.content_type_get_descriptiontypegio.content_type_get_icontypegio.content_type_get_mime_typetypegio.content_type_guessfilenamedatawant_uncertaingio.content_type_is_atypesupertypegio.content_type_is_unknowntypegio.content_types_get_registeredgio.io_error_from_errnoerr_noDescription
These functions are part of the PyGObject gio module
but are not directly associated with a specific class
Functionsgio.content_type_can_be_executablecontent_type_can_be_executabletypetype :a content type string.
Returns :True if the file type corresponds
to a type that can be executable, False otherwise.
The content_type_can_be_executable() function checks
if a content type can be executable. Note that for instance things like text files
can be executables (i.e. scripts and batch files).
gio.content_type_equalscontent_type_equalstype1type2type1 :a content type string.
type2 :a content type string.
Returns :True if the two strings are
identical or equivalent, False otherwise.
The content_type_equals() function compares
two content types for equality.
gio.content_type_from_mime_typecontent_type_from_mime_typemime_typemime_type :a mime type string.
Returns :The content type or None when does not know.
The content_type_from_mime_type() function tries
to find a content type based on the mime type name.
gio.content_type_get_descriptioncontent_type_get_descriptiontypetype :a content type string.
Returns :a short description of the content type type.
The content_type_get_description() function
gets the human readable description of the content type.
gio.content_type_get_iconcontent_type_get_icontypetype :a content type string.
Returns :A gio.Icon
corresponding to the content type.
The content_type_get_icon() function
gets the icon for a content type.
gio.content_type_get_mime_typecontent_type_get_mime_typetypetype :a content type string.
Returns :the registered mime-type for the given type,
or None if unknown.
The content_type_get_mime_type() function
gets the mime-type for the content type. If one is registered
gio.content_type_guesscontent_type_guessfilenamedatawant_uncertainfilename :a string, or None.
data :a stream of data, or None.
want_uncertain :a flag indicating the certainty of the result.
Returns :a string indicating a guessed content type for the given data.
The content_type_guess() function 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.
gio.content_type_is_acontent_type_is_atypesupertypetype :a content type string.
supertype :a string.
Returns :True if type is a kind of
supertype, False otherwise.
The content_type_is_a() function determines
if type is a subset of supertype.
gio.content_type_is_unknowncontent_type_is_unknowntypetype :a content type string.
Returns :True if the type is the unknown type.
The content_type_is_unknown() function checks if
the content type is the generic "unknown" type. On unix this is the
"application/octet-stream" mimetype, while on win32 it is "*".
gio.content_types_get_registeredcontent_types_get_registeredReturns :a list of the registered content types.
The content_types_get_registered() function
gets a list of strings containing all the registered content types
known to the system.
gio.io_error_from_errnoio_error_from_errnoerr_noerr_no :Error number.
Returns :a
The io_error_from_errno() function converts
error codes into GIO error codes.