replace_contents_bytes_async


Description:

[ CCode ( finish_name = "g_file_replace_contents_finish" ) ]
[ Version ( since = "2.40" ) ]
public async bool replace_contents_bytes_async (Bytes contents, string? etag, bool make_backup, FileCreateFlags flags, Cancellable? cancellable = null, out string? new_etag) throws Error

Same as replace_contents_async but takes a Bytes input instead.

This function will keep a ref on contents until the operation is done. Unlike replace_contents_async this allows forgetting about the content without waiting for the callback.

When this operation has completed, callback will be called with user_user data, and the operation can be finalized with replace_contents_async.end.

Parameters:

this

input File

contents

a Bytes

etag

a new [entity tag](entity-tags) for the this, or null

make_backup

true if a backup should be created

flags

a set of FileCreateFlags

cancellable

optional Cancellable object, null to ignore

callback

a TaskReadyCallback to call when the request is satisfied

user_data

the data to pass to callback function