From 59cf55a08fa9ab30da83c67624daa71b8a203d4a Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 7 Dec 2007 09:16:32 +0000 Subject: [PATCH] Update docs wrt etags 2007-12-07 Alexander Larsson * gfile.c: Update docs wrt etags svn path=/trunk/; revision=6064 --- gio/ChangeLog | 5 +++++ gio/gfile.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 06dca4b..c65865d 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,8 @@ +2007-12-07 Alexander Larsson + + * gfile.c: + Update docs wrt etags + 2007-12-06 Alexander Larsson * glocalfileinfo.h: diff --git a/gio/gfile.c b/gio/gfile.c index f8317b9..99cdac0 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -4420,13 +4420,19 @@ g_file_load_contents_finish (GFile *file, * @cancellable: optional #GCancellable object, %NULL to ignore. * @error: a #GError, or %NULL * - * Replaces the contents of @file with @contents of @length bytes. - * The old @etag will be replaced with the @new_etag. If @make_backup - * is %TRUE, this function will attempt to make a backup of @file. + * Replaces the contents of @file with @contents of @length bytes. + + * If @etag is specified (not %NULL) any existing file must have that etag, or + * the error %G_IO_ERROR_WRONG_ETAG will be returned. + * + * If @make_backup is %TRUE, this function will attempt to make a backup of @file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * The returned @new_etag can be used to verify that the file hasn't changed the + * next time it is saved over. * * Returns: %TRUE if successful. If an error * has occured, this function will return %FALSE and set @error -- 2.7.4