gfile: Clarify that g_file_replace_contents() uses atomic renames

It uses g_file_replace() internally, so is inherently safe.

Though it might vomit .goutputstream-XXXXXX files all over the place
occasionally.
This commit is contained in:
Philip Withnall 2015-06-17 09:25:49 +01:00
parent 6e57650387
commit 4b02bfd6ee

View File

@ -7132,7 +7132,9 @@ g_file_load_contents_finish (GFile *file,
* or the error %G_IO_ERROR_WRONG_ETAG will be returned. * or the error %G_IO_ERROR_WRONG_ETAG will be returned.
* *
* If @make_backup is %TRUE, this function will attempt to make a backup * If @make_backup is %TRUE, this function will attempt to make a backup
* of @file. * of @file. Internally, it uses g_file_replace(), so will try to replace the
* file contents in the safest way possible. For example, atomic renames are
* used when replacing local files contents.
* *
* If @cancellable is not %NULL, then the operation can be cancelled by * If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation * triggering the cancellable object from another thread. If the operation