Function

GLibbasename

deprecated: 2.2 

Declaration [src]

const gchar*
g_basename (
  const gchar* file_name
)

Description [src]

Gets the name of the file without any leading directory components. It returns a pointer into the given file name string.

Deprecated since: 2.2

Use g_path_get_basename() instead, but notice that g_path_get_basename() allocates new memory for the returned string, unlike this function which returns a pointer into the argument.

Parameters

file_name

Type: const gchar*

The name of the file.

The data is owned by the caller of the function.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.

Return value

Type: const gchar*

The name of the file without any leading directory components.

The data is owned by the called function.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.