Dex.file_replace_readwrite
Description: Reference for Dex.file_replace_readwrite

### Function

# Dexfile_replace_readwrite

unstable since: 1.2

#### Declaration [src]

    DexFuture*
    dex_file_replace_readwrite (
      GFile* file,
      const char* etag,
      gboolean make_backup,
      GFileCreateFlags flags,
      int io_priority
    )

#### Description [src]

Wraps `g_file_replace_readwrite_async()` as a `DexFuture`.

Available since: 1.2

#### Parameters

`file`

  Type: `GFile`

  A `GFile`.

  The data is owned by the caller of the function.

`etag`

  Type: `const char*`

  The etag or `NULL`.

  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`

  Type: `gboolean`

  If a backup file should be created.

`flags`

  Type: `GFileCreateFlags`

  Flags for replacing the file.

`io_priority`

  Type: `int`

  Priority for the IO operation.

#### Return value

Type: `DexFuture`

A `DexFuture` that resolves to a `GFileIOStream` or rejects with error.

The caller of the function takes ownership of the data, and is responsible for freeing it.