Home | History | Annotate | Download | only in gio

Lines Matching refs:info

225   GFileInfo *info;
229 info = G_FILE_INFO (object);
231 attrs = (GFileAttribute *)info->attributes->data;
232 for (i = 0; i < info->attributes->len; i++)
234 g_array_free (info->attributes, TRUE);
236 if (info->mask != NO_ATTRIBUTE_MASK)
237 g_file_attribute_matcher_unref (info->mask);
251 g_file_info_init (GFileInfo *info)
253 info->mask = NO_ATTRIBUTE_MASK;
254 info->attributes = g_array_new (FALSE, FALSE,
261 * Creates a new file info structure.
318 * Duplicates a file info structure.
336 * @info: a #GFileInfo.
339 * Sets @mask on @info to match specific attribute types.
342 g_file_info_set_attribute_mask (GFileInfo *info,
348 g_return_if_fail (G_IS_FILE_INFO (info));
350 if (mask != info->mask)
352 if (info->mask != NO_ATTRIBUTE_MASK)
353 g_file_attribute_matcher_unref (info->mask);
354 info->mask = g_file_attribute_matcher_ref (mask);
357 for (i = 0; i < info->attributes->len; i++)
359 attr = &g_array_index (info->attributes, GFileAttribute, i);
364 g_array_remove_index (info->attributes, i);
373 * @info: #GFileInfo.
379 g_file_info_unset_attribute_mask (GFileInfo *info)
381 g_return_if_fail (G_IS_FILE_INFO (info));
383 if (info->mask != NO_ATTRIBUTE_MASK)
384 g_file_attribute_matcher_unref (info->mask);
385 info->mask = NO_ATTRIBUTE_MASK;
390 * @info: a #GFileInfo.
392 * Clears the status information from @info.
395 g_file_info_clear_status (GFileInfo *info)
400 g_return_if_fail (G_IS_FILE_INFO (info));
402 attrs = (GFileAttribute *)info->attributes->data;
403 for (i = 0; i < info->attributes->len; i++)
408 g_file_info_find_place (GFileInfo *info,
417 max = info->attributes->len;
419 attrs = (GFileAttribute *)info->attributes->data;
439 g_file_info_find_value (GFileInfo *info,
445 i = g_file_info_find_place (info, attr_id);
446 attrs = (GFileAttribute *)info->attributes->data;
447 if (i < info->attributes->len &&
455 g_file_info_find_value_by_name (GFileInfo *info,
461 return g_file_info_find_value (info, attr_id);
466 * @info: a #GFileInfo.
469 * Checks if a file info structure has an attribute named @attribute.
475 g_file_info_has_attribute (GFileInfo *info,
480 g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
483 value = g_file_info_find_value_by_name (info, attribute);
489 * @info: a #GFileInfo.
492 * Lists the file info structure's attributes.
499 g_file_info_list_attributes (GFileInfo *info,
508 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
511 attrs = (GFileAttribute *)info->attributes->data;
512 for (i = 0; i < info->attributes->len; i++)
527 * @info: a #GFileInfo.
536 g_file_info_get_attribute_type (GFileInfo *info,
541 g_return_val_if_fail (G_IS_FILE_INFO (info), G_FILE_ATTRIBUTE_TYPE_INVALID);
544 value = g_file_info_find_value_by_name (info, attribute);
553 * @info: a #GFileInfo.
556 * Removes all cases of @attribute from @info if it exists.
559 g_file_info_remove_attribute (GFileInfo *info,
566 g_return_if_fail (G_IS_FILE_INFO (info));
571 i = g_file_info_find_place (info, attr_id);
572 attrs = (GFileAttribute *)info->attributes->data;
573 if (i < info->attributes->len &&
577 g_array_remove_index (info->attributes, i);
583 * @info: a #GFileInfo
591 * Returns: %TRUE if @info has an attribute named @attribute,
595 g_file_info_get_attribute_data (GFileInfo *info,
603 value = g_file_info_find_value_by_name (info, attribute);
621 * @info: a #GFileInfo
631 g_file_info_get_attribute_status (GFileInfo *info,
636 g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
639 val = g_file_info_find_value_by_name (info, attribute);
648 _g_file_info_get_attribute_value (GFileInfo *info,
652 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
655 return g_file_info_find_value_by_name (info, attribute);
660 * @info: a #GFileInfo.
671 g_file_info_get_attribute_as_string (GFileInfo *info,
675 val = _g_file_info_get_attribute_value (info, attribute);
684 * @info: a #GFileInfo.
694 g_file_info_get_attribute_object (GFileInfo *info,
699 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
702 value = g_file_info_find_value_by_name (info, attribute);
708 * @info: a #GFileInfo.
718 g_file_info_get_attribute_string (GFileInfo *info,
723 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
726 value = g_file_info_find_value_by_name (info, attribute);
732 * @info: a #GFileInfo.
742 g_file_info_get_attribute_byte_string (GFileInfo *info,
747 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
750 value = g_file_info_find_value_by_name (info, attribute);
756 * @info: a #GFileInfo.
765 g_file_info_get_attribute_boolean (GFileInfo *info,
770 g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
773 value = g_file_info_find_value_by_name (info, attribute);
779 * @info: a #GFileInfo.
789 g_file_info_get_attribute_uint32 (GFileInfo *info,
794 g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
797 value = g_file_info_find_value_by_name (info, attribute);
803 * @info: a #GFileInfo.
813 g_file_info_get_attribute_int32 (GFileInfo *info,
818 g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
821 value = g_file_info_find_value_by_name (info, attribute);
827 * @info: a #GFileInfo.
837 g_file_info_get_attribute_uint64 (GFileInfo *info,
842 g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
845 value = g_file_info_find_value_by_name (info, attribute);
851 * @info: a #GFileInfo.
861 g_file_info_get_attribute_int64 (GFileInfo *info,
866 g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
869 value = g_file_info_find_value_by_name (info, attribute);
874 g_file_info_create_value (GFileInfo *info,
880 if (info->mask != NO_ATTRIBUTE_MASK &&
881 !g_file_attribute_matcher_matches_id (info->mask, attr_id))
884 i = g_file_info_find_place (info, attr_id);
886 attrs = (GFileAttribute *)info->attributes->data;
887 if (i < info->attributes->len &&
894 g_array_insert_val (info->attributes, i, attr);
896 attrs = (GFileAttribute *)info->attributes->data;
902 g_file_info_create_value_by_name (GFileInfo *info,
909 return g_file_info_create_value (info, attr_id);
914 * @info: a #GFileInfo.
922 g_file_info_set_attribute (GFileInfo *info,
929 g_return_if_fail (G_IS_FILE_INFO (info));
932 value = g_file_info_create_value_by_name (info, attribute);
940 * @info: a #GFileInfo.
948 g_file_info_set_attribute_object (GFileInfo *info,
954 g_return_if_fail (G_IS_FILE_INFO (info));
958 value = g_file_info_create_value_by_name (info, attribute);
965 * @info: a #GFileInfo.
973 g_file_info_set_attribute_string (GFileInfo *info,
979 g_return_if_fail (G_IS_FILE_INFO (info));
983 value = g_file_info_create_value_by_name (info, attribute);
990 * @info: a #GFileInfo.
998 g_file_info_set_attribute_byte_string (GFileInfo *info,
1004 g_return_if_fail (G_IS_FILE_INFO (info));
1008 value = g_file_info_create_value_by_name (info, attribute);
1015 * @info: a #GFileInfo.
1023 g_file_info_set_attribute_boolean (GFileInfo *info,
1029 g_return_if_fail (G_IS_FILE_INFO (info));
1032 value = g_file_info_create_value_by_name (info, attribute);
1039 * @info: a #GFileInfo.
1047 g_file_info_set_attribute_uint32 (GFileInfo *info,
1053 g_return_if_fail (G_IS_FILE_INFO (info));
1056 value = g_file_info_create_value_by_name (info, attribute);
1064 * @info: a #GFileInfo.
1072 g_file_info_set_attribute_int32 (GFileInfo *info,
1078 g_return_if_fail (G_IS_FILE_INFO (info));
1081 value = g_file_info_create_value_by_name (info, attribute);
1088 * @info: a #GFileInfo.
1096 g_file_info_set_attribute_uint64 (GFileInfo *info,
1102 g_return_if_fail (G_IS_FILE_INFO (info));
1105 value = g_file_info_create_value_by_name (info, attribute);
1112 * @info: a #GFileInfo.
1121 g_file_info_set_attribute_int64 (GFileInfo *info,
1127 g_return_if_fail (G_IS_FILE_INFO (info));
1130 value = g_file_info_create_value_by_name (info, attribute);
1138 * @info: a #GFileInfo.
1146 g_file_info_get_file_type (GFileInfo *info)
1151 g_return_val_if_fail (G_IS_FILE_INFO (info), G_FILE_TYPE_UNKNOWN);
1156 value = g_file_info_find_value (info, attr);
1162 * @info: a #GFileInfo.
1169 g_file_info_get_is_hidden (GFileInfo *info)
1174 g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
1179 value = g_file_info_find_value (info, attr);
1185 * @info: a #GFileInfo.
1192 g_file_info_get_is_backup (GFileInfo *info)
1197 g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
1202 value = g_file_info_find_value (info, attr);
1208 * @info: a #GFileInfo.
1212 * Returns: %TRUE if the given @info is a symlink.
1215 g_file_info_get_is_symlink (GFileInfo *info)
1220 g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
1225 value = g_file_info_find_value (info, attr);
1231 * @info: a #GFileInfo.
1238 g_file_info_get_name (GFileInfo *info)
1243 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
1248 value = g_file_info_find_value (info, attr);
1254 * @info: a #GFileInfo.
1261 g_file_info_get_display_name (GFileInfo *info)
1266 info), NULL);
1271 value = g_file_info_find_value (info, attr);
1277 * @info: a #GFileInfo.
1284 g_file_info_get_edit_name (GFileInfo *info)
1289 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
1294 value = g_file_info_find_value (info, attr);
1300 * @info: a #GFileInfo.
1304 * Returns: #GIcon for the given @info.
1307 g_file_info_get_icon (GFileInfo *info)
1313 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
1318 value = g_file_info_find_value (info, attr);
1327 * @info: a #GFileInfo.
1334 g_file_info_get_content_type (GFileInfo *info)
1339 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
1344 value = g_file_info_find_value (info, attr);
1350 * @info: a #GFileInfo.
1357 g_file_info_get_size (GFileInfo *info)
1362 g_return_val_if_fail (G_IS_FILE_INFO (info), (goffset) 0);
1367 value = g_file_info_find_value (info, attr);
1373 * @info: a #GFileInfo.
1376 * Gets the modification time of the current @info and sets it
1380 g_file_info_get_modification_time (GFileInfo *info,
1386 g_return_if_fail (G_IS_FILE_INFO (info));
1395 value = g_file_info_find_value (info, attr_mtime);
1397 value = g_file_info_find_value (info, attr_mtime_usec);
1403 * @info: a #GFileInfo.
1410 g_file_info_get_symlink_target (GFileInfo *info)
1415 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
1420 value = g_file_info_find_value (info, attr);
1426 * @info: a #GFileInfo.
1434 g_file_info_get_etag (GFileInfo *info)
1439 g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
1444 value = g_file_info_find_value (info, attr);
1450 * @info: a #GFileInfo.
1458 g_file_info_get_sort_order (GFileInfo *info)
1463 g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
1468 value = g_file_info_find_value (info, attr);
1475 * @info: a #GFileInfo.
1482 g_file_info_set_file_type (GFileInfo *info,
1488 g_return_if_fail (G_IS_FILE_INFO (info));
1493 value = g_file_info_create_value (info, attr);
1500 * @info: a #GFileInfo.
1507 g_file_info_set_is_hidden (GFileInfo *info,
1513 g_return_if_fail (G_IS_FILE_INFO (info));
1518 value = g_file_info_create_value (info, attr);
1525 * @info: a #GFileInfo.
1532 g_file_info_set_is_symlink (GFileInfo *info,
1538 g_return_if_fail (G_IS_FILE_INFO (info));
1543 value = g_file_info_create_value (info, attr);
1550 * @info: a #GFileInfo.
1557 g_file_info_set_name (GFileInfo *info,
1563 g_return_if_fail (G_IS_FILE_INFO (info));
1569 value = g_file_info_create_value (info, attr);
1576 * @info: a #GFileInfo.
1583 g_file_info_set_display_name (GFileInfo *info,
1589 g_return_if_fail (G_IS_FILE_INFO (info));
1595 value = g_file_info_create_value (info, attr);
1602 * @info: a #GFileInfo.
1609 g_file_info_set_edit_name (GFileInfo *info,
1615 g_return_if_fail (G_IS_FILE_INFO (info));
1621 value = g_file_info_create_value (info, attr);
1628 * @info: a #GFileInfo.
1635 g_file_info_set_icon (GFileInfo *info,
1641 g_return_if_fail (G_IS_FILE_INFO (info));
1647 value = g_file_info_create_value (info, attr);
1654 * @info: a #GFileInfo.
1661 g_file_info_set_content_type (GFileInfo *info,
1667 g_return_if_fail (G_IS_FILE_INFO (info));
1673 value = g_file_info_create_value (info, attr);
1680 * @info: a #GFileInfo.
1683 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
1687 g_file_info_set_size (GFileInfo *info,
1693 g_return_if_fail (G_IS_FILE_INFO (info));
1698 value = g_file_info_create_value (info, attr);
1705 * @info: a #GFileInfo.
1709 * info to the given time value.
1712 g_file_info_set_modification_time (GFileInfo *info,
1718 g_return_if_fail (G_IS_FILE_INFO (info));
1727 value = g_file_info_create_value (info, attr_mtime);
1730 value = g_file_info_create_value (info, attr_mtime_usec);
1737 * @info: a #GFileInfo.
1740 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
1744 g_file_info_set_symlink_target (GFileInfo *info,
1750 g_return_if_fail (G_IS_FILE_INFO (info));
1756 value = g_file_info_create_value (info, attr);
1763 * @info: a #GFileInfo.
1766 * Sets the sort order attribute in the file info structure. See
1770 g_file_info_set_sort_order (GFileInfo *info,
1776 g_return_if_fail (G_IS_FILE_INFO (info));
1781 value = g_file_info_create_value (info, attr);