/* Returns: (nullable) (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the possible attribute types for the given @name_space, or NULL on error.  */
char** g_file_info_list_attributes(GFileInfo *info, const char *name_space)
/* Returns: (nullable) (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the possible attribute types for the given @name_space, or NULL on error.  */
char** g_file_info_list_attributes(GFileInfo *info, const char *name_space)
{
  GPtrArray *names;
  GFileAttribute *attrs;
  guint32 attribute;
  guint32 ns_id = (name_space) ? lookup_namespace (name_space) : 0;
  int i;
  g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
  names = g_ptr_array_new ();
  attrs = (GFileAttribute *)info->attributes->data;
  for (i = 0; i < info->attributes->len; i++)
    {
      attribute = attrs[i].attribute;
      if (ns_id == 0 || GET_NS (attribute) == ns_id)
        g_ptr_array_add (names, g_strdup (get_attribute_for_id (attribute)));
    }
  g_ptr_array_add (names, NULL);
  return (char **)g_ptr_array_free (names, FALSE);
}