Function

GLib-2.0GLibbasenameDeprecated 2.2

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

    Parameters

    • Deprecatedfile_name: string

      the name of the file

    Returns string

    the name of the file without any leading directory components

    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.