openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glib-2.0/1_2.60.3-r0/glib-2.60.3/gio/gfile.c
void g_file_replace_contents_async(GFile* file, const char* contents,
                                   gsize length, const char* etag,
                                   gboolean make_backup, GFileCreateFlags flags,
                                   GCancellable* cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data)
{
    GBytes* bytes;

    bytes = g_bytes_new_static(contents, length);
    g_file_replace_contents_bytes_async(file, bytes, etag, make_backup, flags,
                                        cancellable, callback, user_data);
    g_bytes_unref(bytes);
}
/**
 * g_file_replace_contents_async:
 * @file: input #GFile
 * @contents: (element-type guint8) (array length=length): string of contents to
 * replace the file with
 * @length: the length of @contents in bytes
 * @etag: (nullable): a new [entity tag][gfile-etag] for the @file, or %NULL
 * @make_backup: %TRUE if a backup should be created
 * @flags: a set of #GFileCreateFlags
 * @cancellable: optional #GCancellable object, %NULL to ignore
 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
 * @user_data: the data to pass to callback function
 *
 * Starts an asynchronous replacement of @file with the given
 * @contents of @length bytes. @etag will replace the document's
 * current entity tag.
 *
 * When this operation has completed, @callback will be called with
 * @user_user data, and the operation can be finalized with
 * g_file_replace_contents_finish().
 *
 * 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.
 *
 * If @make_backup is %TRUE, this function will attempt to
 * make a backup of @file.
 *
 * Note that no copy of @content will be made, so it must stay valid
 * until @callback is called. See g_file_replace_contents_bytes_async()
 * for a #GBytes version that will automatically hold a reference to the
 * contents (without copying) for the duration of the call.
 */


Starts an asynchronous replacement of @file with the given
@contents of @length bytes. @etag will replace the document's
current entity tag.

When this operation has completed, @callback will be called with
@user_user data, and the operation can be finalized with
g_file_replace_contents_finish().

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.

If @make_backup is %TRUE, this function will attempt to
make a backup of @file.

Note that no copy of @content will be made, so it must stay valid
until @callback is called. See g_file_replace_contents_bytes_async()
for a #GBytes version that will automatically hold a reference to the
contents (without copying) for the duration of the call.
Starts an asynchronous replacement of @file with the given @contents of @length bytes . @etag will replace the document ' s current entity tag . When this operation has completed @callback will be called with @user_user data and the operation can be finalized with g_file_replace_contents_finish () . 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 . If @make_backup is %TRUE this function will attempt to make a backup of @file . Note that no copy of @content will be made so it must stay valid until @callback is called . See g_file_replace_contents_bytes_async () for a #GBytes version that will automatically hold a reference to the contents ( without copying ) for the duration of the call .
void g_file_replace_contents_async(GFile* file, const char* contents,
                                   gsize length, const char* etag,
                                   gboolean make_backup, GFileCreateFlags flags,
                                   GCancellable* cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data)
{
    GBytes* bytes;
    bytes = g_bytes_new_static(contents, length);
    g_file_replace_contents_bytes_async(file, bytes, etag, make_backup, flags,
                                        cancellable, callback, user_data);
    g_bytes_unref(bytes);
}
void g_file_replace_contents_async ( GFile * file , const char * contents , gsize length , const char * etag , gboolean make_backup , GFileCreateFlags flags , GCancellable * cancellable , GAsyncReadyCallback callback , gpointer user_data ) { GBytes * bytes ; bytes = g_bytes_new_static ( contents , length ) ; g_file_replace_contents_bytes_async ( file , bytes , etag , make_backup , flags , cancellable , callback , user_data ) ; g_bytes_unref ( bytes ) ; }
g_file_replace_contents_async:
 @file: input #GFile
 @contents: (element-type guint8) (array length=length): string of contents to
 replace the file with
 @length: the length of @contents in bytes
 @etag: (nullable): a new [entity tag][gfile-etag] for the @file, or %NULL
 @make_backup: %TRUE if a backup should be created
 @flags: a set of #GFileCreateFlags
 @cancellable: optional #GCancellable object, %NULL to ignore
 @callback: a #GAsyncReadyCallback to call when the request is satisfied
 @user_data: the data to pass to callback function
g_file_replace_contents_async : @file : input #GFile @contents : ( element - type guint8 ) ( array length = length ) : string of contents to replace the file with @length : the length of @contents in bytes @etag : ( nullable ) : a new [ entity tag ] [ gfile - etag ] for the @file or %NULL @make_backup : %TRUE if a backup should be created @flags : a set of #GFileCreateFlags @cancellable : optional #GCancellable object %NULL to ignore @callback : a #GAsyncReadyCallback to call when the request is satisfied @user_data : the data to pass to callback function