Method
GioFilereplace_contents_bytes_async
Declaration
void
g_file_replace_contents_bytes_async (
GFile* file,
GBytes* contents,
const char* etag,
gboolean make_backup,
GFileCreateFlags flags,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
)
Description
Same as g_file_replace_contents_async()
but takes a GBytes
input instead.
This function will keep a ref on contents
until the operation is done.
Unlike g_file_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 g_file_replace_contents_finish().
Available since: | 2.40 |
Parameters
contents |
GBytes |
A |
|
The data is owned by the caller of the function. | |
etag |
const char* |
A new [entity tag][gfile-etag] for the |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
make_backup |
gboolean |
|
|
flags |
GFileCreateFlags |
A set of |
|
cancellable |
GCancellable |
Optional |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
callback |
GAsyncReadyCallback |
A |
|
The argument can be NULL . | |
user_data |
gpointer |
The data to pass to callback function. |
|
The argument can be NULL . | |
The data is owned by the caller of the function. |