Lines Matching refs:list
40 * File attributes in GIO consist of a list of key-value pairs.
48 * Values are stored within the list in #GFileAttributeValue structures.
53 * The list of possible attributes for a filesystem (pointed to by a #GFile) is
54 * availible as a #GFileAttributeInfoList. This list is queryable by key names
76 * namespace is used by file managers and applications that list directories
827 * Creates a new file attribute info list.
848 * @list: a #GFileAttributeInfoList to duplicate.
850 * Makes a duplicate of a file attribute info list.
852 * Returns: a copy of the given @list.
855 g_file_attribute_info_list_dup (GFileAttributeInfoList *list)
860 g_return_val_if_fail (list != NULL, NULL);
866 g_array_set_size (new->array, list->n_infos);
868 for (i = 0; i < list->n_infos; i++)
870 new->public.infos[i].name = g_strdup (list->infos[i].name);
871 new->public.infos[i].type = list->infos[i].type;
872 new->public.infos[i].flags = list->infos[i].flags;
880 * @list: a #GFileAttributeInfoList to reference.
882 * References a file attribute info list.
887 g_file_attribute_info_list_ref (GFileAttributeInfoList *list)
889 GFileAttributeInfoListPriv *priv = (GFileAttributeInfoListPriv *)list;
891 g_return_val_if_fail (list != NULL, NULL);
896 return list;
901 * @list: The #GFileAttributeInfoList to unreference.
903 * Removes a reference from the given @list. If the reference count
904 * falls to zero, the @list is deleted.
907 g_file_attribute_info_list_unref (GFileAttributeInfoList *list)
909 GFileAttributeInfoListPriv *priv = (GFileAttributeInfoListPriv *)list;
912 g_return_if_fail (list != NULL);
917 for (i = 0; i < list->n_infos; i++)
918 g_free (list->infos[i].name);
924 g_file_attribute_info_list_bsearch (GFileAttributeInfoList *list,
930 end = list->n_infos;
936 if (strcmp (name, list->infos[mid].name) < 0)
938 else if (strcmp (name, list->infos[mid].name) > 0)
948 * @list: a #GFileAttributeInfoList.
951 * Gets the file attribute with the name @name from @list.
957 g_file_attribute_info_list_lookup (GFileAttributeInfoList *list,
962 g_return_val_if_fail (list != NULL, NULL);
965 i = g_file_attribute_info_list_bsearch (list, name);
967 if (i < list->n_infos && strcmp (list->infos[i].name, name) == 0)
968 return &list->infos[i];
975 * @list: a #GFileAttributeInfoList.
980 * Adds a new attribute with @name to the @list, setting
984 g_file_attribute_info_list_add (GFileAttributeInfoList *list,
989 GFileAttributeInfoListPriv *priv = (GFileAttributeInfoListPriv *)list;
993 g_return_if_fail (list != NULL);
996 i = g_file_attribute_info_list_bsearch (list, name);
998 if (i < list->n_infos && strcmp (list->infos[i].name, name) == 0)
1000 list->infos[i].type = type;