Function

Ideg_file_get_uncanonical_relative_path

Declaration

gchar*
ide_g_file_get_uncanonical_relative_path (
  GFile* file,
  GFile* other
)

Description

This function is similar to g_file_get_relative_path() except that file and other only need to have a shared common ancestor.

This is useful if you must use a relative path instead of the absolute, canonical path.

This is being implemented for use when communicating to GDB. When that becomes unnecessary, this should no longer be used.

Parameters

file

Type: GFile

A GFile.

The data is owned by the caller of the function.
other

Type: GFile

A GFile with a common ancestor to file.

The data is owned by the caller of the function.

Return value

Type: gchar*

A relative path, or NULL if no common ancestor was found for the relative path.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.