gio Functions
def gio.content_type_can_be_executable(type)def gio.content_type_equals(type1,type2)def gio.content_type_from_mime_type(mime_type)def gio.content_type_get_description(type)def gio.content_type_get_icon(type)def gio.content_type_get_mime_type(type)def gio.content_type_guess(filename,data,want_uncertain)def gio.content_type_is_a(type,supertype)def gio.content_type_is_unknown(type)def gio.content_types_get_registered()def gio.io_error_from_errno(err_no)
These functions are part of the PyGObject gio module
but are not directly associated with a specific class
def content_type_can_be_executable(type)
| 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).
def content_type_equals(type1, type2)
| a content type string. |
| 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.
def content_type_from_mime_type(mime_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.
def content_type_get_description(type)
| 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.
def content_type_get_icon(type)
| 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.
def content_type_get_mime_type(type)
| 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
def content_type_guess(filename, data, want_uncertain)
| a string, or None.
|
| a stream of data, or None.
|
| 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.
def content_type_is_a(type, supertype)
| a content type string. |
| 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.
def content_type_is_unknown(type)
| 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 "*".
def content_types_get_registered()Returns : | 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.
def io_error_from_errno(err_no)
| Error number. |
Returns : | a Gio Error Constants |
The io_error_from_errno() function converts
error codes into GIO error codes.