Function

Gimpfile_get_utf8_name

since: 2.10

Declaration [src]

const gchar*
gimp_file_get_utf8_name (
  GFile* file
)

Description [src]

This function works like gimp_filename_to_utf8() and returns a UTF-8 encoded string that does not need to be freed.

It converts a GFiles path or uri to UTF-8 temporarily. The return value is a pointer to a string that is guaranteed to be valid only during the current iteration of the main loop or until the next call to gimp_file_get_utf8_name().

The only purpose of this function is to provide an easy way to pass a GFiles name to a function that expects an UTF-8 encoded string.

See g_file_get_parse_name().

Available since: 2.10

Parameters

file

Type: GFile

A GFile.

The data is owned by the caller of the function.

Return value

Type: const gchar*

A temporarily valid UTF-8 representation of files name. This string must not be changed or freed.

The data is owned by the called function.
The value is a NUL terminated UTF-8 string.