Home | History | Annotate | Download | only in gio

Lines Matching full:error

138 								   GError                **error);
147 GError **error);
157 GError **error);
165 GError **error);
174 GError **error);
183 GError **error);
194 GError **error);
199 GError **error);
208 GError **error);
219 GError **error);
227 GError **error);
239 GError **error);
652 * @error: #GError.
655 * version of the name). If this function fails, it returns %NULL and @error will be
669 GError **error)
678 return (* iface->get_child_for_display_name) (file, display_name, error);
781 * @error: #GError for error reporting.
788 * should be gathered. It is not an error if it's not possible to read a particular
797 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
799 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
800 * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
803 * Returns: A #GFileEnumerator if successful, %NULL on error.
811 GError **error)
818 if (g_cancellable_set_error_if_cancelled (cancellable, error))
825 g_set_error_literal (error, G_IO_ERROR,
832 cancellable, error);
883 * @error: a #GError.
888 * Returns: a #GFileEnumerator or %NULL if an error occurred.
894 GError **error)
904 if (g_simple_async_result_propagate_error (simple, error))
909 return (* iface->enumerate_children_finish) (file, res, error);
928 * on error create it; and: check if it exists, if not create it. These
932 * or fail with a G_IO_ERROR_EXISTS error.
937 * and error
940 * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
1006 * @error: a #GError.
1013 * should be gathered. It is not an error if it's not possible to read a particular
1022 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1031 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
1034 * Returns: a #GFileInfo for the given @file, or %NULL on error.
1042 GError **error)
1048 if (g_cancellable_set_error_if_cancelled (cancellable, error))
1055 g_set_error_literal (error, G_IO_ERROR,
1061 return (* iface->query_info) (file, attributes, flags, cancellable, error);
1112 * @error: a #GError.
1117 * Returns: #GFileInfo for given @file or %NULL on error.
1123 GError **error)
1133 if (g_simple_async_result_propagate_error (simple, error))
1138 return (* iface->query_info_finish) (file, res, error);
1146 * @error: a #GError.
1154 * should be gathered. It is not an error if it's not possible to read a particular
1165 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1167 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
1170 * Returns: a #GFileInfo or %NULL if there was an error.
1177 GError **error)
1183 if (g_cancellable_set_error_if_cancelled (cancellable, error))
1190 g_set_error_literal (error, G_IO_ERROR,
1196 return (* iface->query_filesystem_info) (file, attributes, cancellable, error);
1246 * @error: a #GError.
1251 * Returns: #GFileInfo for given @file or %NULL on error.
1257 GError **error)
1267 if (g_simple_async_result_propagate_error (simple, error))
1272 return (* iface->query_filesystem_info_finish) (file, res, error);
1279 * @error: a #GError.
1284 * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
1289 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1291 * Returns: a #GMount where the @file is located or %NULL on error.
1297 GError **error)
1303 if (g_cancellable_set_error_if_cancelled (cancellable, error))
1310 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
1311 /* Translators: This is an error message when trying to find the
1317 return (* iface->find_enclosing_mount) (file, cancellable, error);
1360 * @error: a #GError
1365 * Returns: #GMount for given @file or %NULL on error.
1371 GError **error)
1381 if (g_simple_async_result_propagate_error (simple, error))
1386 return (* iface->find_enclosing_mount_finish) (file, res, error);
1394 * @error: a #GError, or %NULL
1401 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1403 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
1404 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
1407 * Returns: #GFileInputStream or %NULL on error.
1413 GError **error)
1419 if (g_cancellable_set_error_if_cancelled (cancellable, error))
1426 g_set_error_literal (error, G_IO_ERROR,
1432 return (* iface->read_fn) (file, cancellable, error);
1440 * @error: a #GError, or %NULL
1452 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1455 * return an %G_IO_ERROR_INVALID_FILENAME error.
1456 * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
1460 * Returns: a #GFileOutputStream, or %NULL on error.
1467 GError **error)
1473 if (g_cancellable_set_error_if_cancelled (cancellable, error))
1480 g_set_error_literal (error, G_IO_ERROR,
1486 return (* iface->append_to) (file, flags, cancellable, error);
1494 * @error: a #GError, or %NULL
1506 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1509 * error will be returned.
1511 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
1517 * %NULL on error.
1524 GError **error)
1530 if (g_cancellable_set_error_if_cancelled (cancellable, error))
1537 g_set_error_literal (error, G_IO_ERROR,
1543 return (* iface->create) (file, flags, cancellable, error);
1554 * @error: a #GError, or %NULL
1573 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1577 * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
1586 * error will be returned. If you want to replace anyway, try again with
1589 * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
1591 * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
1593 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
1598 * Returns: a #GFileOutputStream or %NULL on error.
1607 GError **error)
1613 if (g_cancellable_set_error_if_cancelled (cancellable, error))
1620 g_set_error_literal (error, G_IO_ERROR,
1631 return (* iface->replace) (file, etag, make_backup, flags, cancellable, error);
1674 * @error: a #GError, or %NULL
1679 * Returns: a #GFileInputStream or %NULL on error.
1685 GError **error)
1695 if (g_simple_async_result_propagate_error (simple, error))
1700 return (* iface->read_finish) (file, res, error);
1746 * @error: a #GError, or %NULL
1751 * Returns: a valid #GFileOutputStream or %NULL on error.
1757 GError **error)
1767 if (g_simple_async_result_propagate_error (simple, error))
1772 return (* iface->append_to_finish) (file, res, error);
1819 * @error: a #GError, or %NULL
1824 * Returns: a #GFileOutputStream or %NULL on error.
1830 GError **error)
1840 if (g_simple_async_result_propagate_error (simple, error))
1845 return (* iface->create_finish) (file, res, error);
1899 * @error: a #GError, or %NULL
1904 * Returns: a #GFileOutputStream, or %NULL on error.
1910 GError **error)
1920 if (g_simple_async_result_propagate_error (simple, error))
1925 return (* iface->replace_finish) (file, res, error);
1933 GError **error)
1964 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY,
1970 if (!g_file_delete (destination, cancellable, error))
1977 g_propagate_error (error, my_error);
1989 GError **error)
2001 /* There was an error opening the source, try to set a good error for it: */
2024 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_MERGE,
2028 /* continue to would_recurse error */
2032 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_EXISTS,
2039 /* Error getting info from target, return that error
2040 * (except for NOT_FOUND, which is no error here)
2044 g_propagate_error (error, my_error);
2050 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_RECURSE,
2055 g_propagate_error (error, my_error);
2127 * @error: a #GError, %NULL to ignore.
2145 GError **error)
2185 error);
2203 GError **error)
2244 n_read = g_input_stream_read (in, buffer, sizeof (buffer), cancellable, error);
2259 n_written = g_output_stream_write (out, p, n_read, cancellable, error);
2278 error = NULL; /* Ignore further errors */
2288 if (!g_output_stream_close (out, cancellable, error))
2304 GError **error)
2316 error);
2328 if (!copy_symlink (destination, flags, cancellable, target, error))
2345 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
2354 in = open_source_for_copy (source, destination, flags, cancellable, error);
2364 cancellable, error);
2368 out = (GOutputStream *)g_file_create (destination, 0, cancellable, error);
2379 error))
2384 /* Ignore errors here. Failure to copy metadata is not a hard error */
2399 * @error: #GError to set on error, or %NULL
2413 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2422 * error is returned, independent on the status of the @destination.
2425 * error G_IO_ERROR_EXISTS is returned.
2428 * error is returned. If trying to overwrite a directory with a directory the
2429 * G_IO_ERROR_WOULD_MERGE error is returned.
2432 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
2447 GError **error)
2456 if (g_cancellable_set_error_if_cancelled (cancellable, error))
2473 g_propagate_error (error, my_error);
2499 g_propagate_error (error, my_error);
2509 error);
2567 * @error: a #GError, or %NULL
2572 * Returns: a %TRUE on success, %FALSE on error.
2577 GError **error)
2588 if (g_simple_async_result_propagate_error (simple, error))
2593 return (* iface->copy_finish) (file, res, error);
2604 * @error: #GError for returning error conditions, or %NULL
2621 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2630 * error is returned, independent on the status of the @destination.
2633 * error G_IO_ERROR_EXISTS is returned.
2636 * error is returned. If trying to overwrite a directory with a directory the
2637 * G_IO_ERROR_WOULD_MERGE error is returned.
2640 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
2652 GError **error)
2661 if (g_cancellable_set_error_if_cancelled (cancellable, error))
2678 g_propagate_error (error, my_error);
2702 g_propagate_error (error, my_error);
2710 g_set_error_literal (error, G_IO_ERROR,
2719 error))
2722 return g_file_delete (source, cancellable, error);
2729 * @error: a #GError, or %NULL
2735 * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support creating
2736 * directories, this function will fail, setting @error to
2744 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2751 GError **error)
2757 if (g_cancellable_set_error_if_cancelled (cancellable, error))
2764 g_set_error_literal (error, G_IO_ERROR,
2770 return (* iface->make_directory) (file, cancellable, error);
2777 * @error: a #GError, or %NULL
2781 * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
2788 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2798 GError **error)
2805 if (g_cancellable_set_error_if_cancelled (cancellable, error))
2812 g_propagate_error (error, my_error);
2847 g_propagate_error (error, my_error);
2851 return g_file_make_directory (file, cancellable, error);
2859 * @error: a #GError.
2865 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2873 GError **error)
2880 if (g_cancellable_set_error_if_cancelled (cancellable, error))
2885 g_set_error_literal (error, G_IO_ERROR,
2895 g_set_error_literal (error, G_IO_ERROR,
2901 return (* iface->make_symbolic_link) (file, symlink_value, cancellable, error);
2908 * @error: a #GError, or %NULL
2915 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2922 GError **error)
2928 if (g_cancellable_set_error_if_cancelled (cancellable, error))
2935 g_set_error_literal (error, G_IO_ERROR,
2941 return (* iface->delete_file) (file, cancellable, error);
2948 * @error: a #GError, or %NULL
2953 * %G_IO_ERROR_NOT_SUPPORTED error.
2958 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2965 GError **error)
2971 if (g_cancellable_set_error_if_cancelled (cancellable, error))
2978 g_set_error_literal (error,
2984 return (* iface->trash) (file, cancellable, error);
2992 * @error: a #GError, or %NULL
3007 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3010 * if there was an error.
3017 GError **error)
3026 g_set_error (error,
3033 if (g_cancellable_set_error_if_cancelled (cancellable, error))
3038 return (* iface->set_display_name) (file, display_name, cancellable, error);
3085 * @error: a #GError, or %NULL
3090 * Returns: a #GFile or %NULL on error.
3096 GError **error)
3106 if (g_simple_async_result_propagate_error (simple, error))
3111 return (* iface->set_display_name_finish) (file, res, error);
3118 * @error: a #GError, or %NULL
3129 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3137 GError **error)
3145 if (g_cancellable_set_error_if_cancelled (cancellable, error))
3164 g_propagate_error (error, my_error);
3174 * @error: a #GError, or %NULL
3182 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3190 GError **error)
3198 if (g_cancellable_set_error_if_cancelled (cancellable, error))
3217 g_propagate_error (error, my_error);
3231 * @error: a #GError, or %NULL
3237 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3248 GError **error)
3255 if (g_cancellable_set_error_if_cancelled (cancellable, error))
3262 g_set_error_literal (error, G_IO_ERROR,
3268 return (* iface->set_attribute) (file, attribute, type, value_p, flags, cancellable, error);
3277 * @error: a #GError, or %NULL
3280 * not stopping on the first error.
3282 * If there is any error during this operation then @error will be set to
3283 * the first error. Error on particular fields are flagged by setting
3290 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3292 * Returns: %TRUE if there was any error, %FALSE otherwise.
3299 GError **error)
3306 if (g_cancellable_set_error_if_cancelled (cancellable, error))
3317 error);
3326 GError **error)
3346 flags, cancellable, error))
3350 /* Don't set error multiple times */
3351 error = NULL;
3410 * @error: a #GError, or %NULL
3420 GError **error)
3431 return (* iface->set_attributes_finish) (file, result, info, error);
3441 * @error: a #GError, or %NULL
3448 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3458 GError **error)
3462 flags, cancellable, error);
3472 * @error: a #GError, or %NULL
3480 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3491 GError **error)
3495 flags, cancellable, error);
3505 * @error: a #GError, or %NULL
3512 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3523 GError **error)
3527 flags, cancellable, error);
3537 * @error: a #GError, or %NULL
3544 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3555 GError **error)
3559 flags, cancellable, error);
3569 * @error: a #GError, or %NULL
3576 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3587 GError **error)
3591 flags, cancellable, error);
3601 * @error: a #GError, or %NULL
3608 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3618 GError **error)
3622 flags, cancellable, error);
3640 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3682 * @error: a #GError, or %NULL
3689 * Returns: a #GFile or %NULL on error.
3695 GError **error)
3705 if (g_simple_async_result_propagate_error (simple, error))
3710 return (* iface->mount_mountable_finish) (file, result, error);
3725 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3765 * @error: a #GError, or %NULL
3778 GError **error)
3788 if (g_simple_async_result_propagate_error (simple, error))
3793 return (* iface->unmount_mountable_finish) (file, result, error);
3811 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3848 * @error: a #GError, or %NULL
3859 GError **error)
3869 if (g_simple_async_result_propagate_error (simple, error))
3874 return (* iface->eject_mountable_finish) (file, result, error);
3882 * @error: a #GError, or %NULL.
3889 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3891 * Returns: a #GFileMonitor for the given @file, or %NULL on error.
3898 GError **error)
3904 if (g_cancellable_set_error_if_cancelled (cancellable, error))
3911 g_set_error_literal (error, G_IO_ERROR,
3917 return (* iface->monitor_dir) (file, flags, cancellable, error);
3925 * @error: a #GError, or %NULL.
3932 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3934 * Returns: a #GFileMonitor for the given @file, or %NULL on error.
3941 GError **error)
3948 if (g_cancellable_set_error_if_cancelled (cancellable, error))
3970 * @error: a #GError, or %NULL
3977 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
3979 * Returns: a #GFileMonitor for the given @file, or %NULL on error.
3988 GError **error)
3991 return g_file_monitor_directory (file, flags, cancellable, error);
3993 return g_file_monitor_file (file, flags, cancellable, error);
4020 GError *error = NULL;
4026 info = g_file_query_info (G_FILE (object), data->attributes, data->flags, cancellable, &error);
4030 g_simple_async_result_set_from_error (res, error);
4031 g_error_free (error);
4063 GError **error)
4096 GError *error = NULL;
4102 info = g_file_query_filesystem_info (G_FILE (object), data->attributes, cancellable, &error);
4106 g_simple_async_result_set_from_error (res, error);
4107 g_error_free (error);
4137 GError **error)
4171 GError *error = NULL;
4177 enumerator = g_file_enumerate_children (G_FILE (object), data->attributes, data->flags, cancellable, &error);
4181 g_simple_async_result_set_from_error (res, error);
4182 g_error_free (error);
4214 GError **error)
4235 GError *error = NULL;
4241 g_set_error_literal (&error, G_IO_ERROR,
4245 g_simple_async_result_set_from_error (res, error);
4246 g_error_free (error);
4251 stream = iface->read_fn (G_FILE (object), cancellable, &error);
4255 g_simple_async_result_set_from_error (res, error);
4256 g_error_free (error);
4280 GError **error)
4302 GError *error = NULL;
4308 stream = iface->append_to (G_FILE (object), *data, cancellable, &error);
4312 g_simple_async_result_set_from_error (res, error);
4313 g_error_free (error);
4343 GError **error)
4365 GError *error = NULL;
4371 stream = iface->create (G_FILE (object), *data, cancellable, &error);
4375 g_simple_async_result_set_from_error (res, error);
4376 g_error_free (error);
4406 GError **error)
4443 GError *error = NULL;
4455 &error);
4459 g_simple_async_result_set_from_error (res, error);
4460 g_error_free (error);
4494 GError **error)
4527 GError *error = NULL;
4533 file = g_file_set_display_name (G_FILE (object), data->name, cancellable, &error);
4537 g_simple_async_result_set_from_error (res, error);
4538 g_error_free (error);
4568 GError **error)
4586 GError *error;
4594 if (data->error)
4595 g_error_free (data->error);
4608 data->error = NULL;
4613 &data->error);
4643 GError **error)
4655 if (error != NULL && data->error)
4656 *error = g_error_copy (data->error);
4666 GError *error = NULL;
4669 mount = g_file_find_enclosing_mount (G_FILE (object), cancellable, &error);
4673 g_simple_async_result_set_from_error (res, error);
4674 g_error_free (error);
4698 GError **error)
4782 GError *error;
4787 error = NULL;
4795 &error);
4805 g_simple_async_result_set_from_error (res, error);
4806 g_error_free (error);
4844 GError **error)
4846 /* Error handled in g_file_copy_finish() */
4990 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5024 * @error: a #GError, or %NULL
5028 * Returns: %TRUE if successful. If an error
5029 * has occurred, this function will return %FALSE and set @error
5035 GError **error)
5045 if (g_simple_async_result_propagate_error (simple, error))
5051 return (* iface->mount_enclosing_volume_finish) (location, result, error);
5062 * @error: a #GError, or %NULL
5069 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5077 GError **error)
5096 error);
5117 g_set_error_literal (error, G_IO_ERROR,
5136 * @error: a #GError, or %NULL
5145 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5156 GError **error)
5167 in = g_file_read (file, cancellable, error);
5178 cancellable, error)) > 0)
5205 /* error is set already */
5223 GError *error;
5237 if (data->error)
5238 g_error_free (data->error);
5299 GError *error = NULL;
5302 read_size = g_input_stream_read_finish (stream, read_res, &error);
5306 /* Error or EOF, close the file */
5307 data->error = error;
5356 GError *error = NULL;
5359 stream = g_file_read_finish (file, open_res, &error);
5379 error);
5381 g_error_free (error);
5405 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5444 * @error: a #GError, or %NULL
5452 * Returns: %TRUE if the load was successful. If %FALSE and @error is
5461 GError **error)
5472 if (g_simple_async_result_propagate_error (simple, error))
5479 if (data->error)
5481 g_propagate_error (error, data->error);
5482 data->error = NULL;
5527 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5550 * @error: a #GError, or %NULL
5558 * Returns: %TRUE if the load was successful. If %FALSE and @error is
5567 GError **error)
5574 error);
5590 * @error: a #GError, or %NULL
5595 * the error %G_IO_ERROR_WRONG_ETAG will be returned.
5601 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5606 * Returns: %TRUE if successful. If an error
5607 * has occurred, this function will return %FALSE and set @error
5619 GError **error)
5629 out = g_file_replace (file, etag, make_backup, flags, cancellable, error);
5640 error)) > 0)
5652 /* error is set already */
5656 ret = g_output_stream_close (G_OUTPUT_STREAM (out), cancellable, error);
5668 GError *error;
5681 if (data->error)
5682 g_error_free (data->error);
5721 GError *error = NULL;
5724 write_size = g_output_stream_write_finish (stream, read_res, &error);
5728 /* Error or EOF, close the file */
5730 data->error = error;
5762 GError *error = NULL;
5765 stream = g_file_replace_finish (file, open_res, &error);
5783 error);
5785 g_error_free (error);
5813 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
5862 * @error: a #GError, or %NULL
5874 GError **error)
5884 if (g_simple_async_result_propagate_error (simple, error))
5891 if (data->error)
5893 g_propagate_error (error, data->error);
5894 data->error = NULL;