Method
GioMountguess_content_type_sync
since: 2.18
Declaration [src]
gchar**
g_mount_guess_content_type_sync (
GMount* mount,
gboolean force_rescan,
GCancellable* cancellable,
GError** error
)
Description [src]
Tries to guess the type of content stored on mount. Returns one or
more textual identifiers of well-known content types (typically
prefixed with “x-content/”), e.g. x-content/image-dcf for camera
memory cards. See the
shared-mime-info
specification for more on x-content types.
This is a synchronous operation and as such may block doing IO; see g_mount_guess_content_type() for the asynchronous version.
Available since: 2.18
Parameters
force_rescan-
Type:
gbooleanWhether to force a rescan of the content. Otherwise a cached result will be used if available.
cancellable-
Type:
GCancellableOptional
GCancellableobject,NULLto ignore.The argument can be NULL.The data is owned by the caller of the method. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: An array of utf8
A NULL-terminated array of content types or NULL on error.
Caller should free this array with g_strfreev() when done with it.
The array is NULL-terminated. |
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
| Each element is a NUL terminated UTF-8 string. |