Function

Giocontent_type_guess_for_tree

Declaration [src]

gchar**
g_content_type_guess_for_tree (
  GFile* root
)

Description [src]

Tries to guess the type of the tree with root root, by looking at the files it contains. The result is an array of content types, with the best guess coming first.

The types returned all have the form x-content/foo, e.g. x-content/audio-cdda (for audio CDs) or x-content/image-dcf (for a camera memory card). See the shared-mime-info specification for more on x-content types.

This function is useful in the implementation of g_mount_guess_content_type().

Available since:2.18

Parameters

root GFile
 

The root of the tree to guess a type for.

 The data is owned by the caller of the function.

Return value

Returns: An array of utf8
 

An NULL-terminated array of zero or more content types. Free with g_strfreev()

 The caller of the function takes ownership of the data, and is responsible for freeing it.