### Method

# Xdp Portal save_file

#### Declaration [src]

    void
    xdp_portal_save_file (
      XdpPortal* portal,
      XdpParent* parent,
      const char* title,
      const char* current_name,
      const char* current_folder,
      const char* current_file,
      GVariant* filters,
      GVariant* current_filter,
      GVariant* choices,
      XdpSaveFileFlags flags,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer data
    )

#### Description [src]

Asks the user for a location to save a file.

The format for the `filters` argument is the same as for `xdp_portal_open_file()`.

The format for the `choices` argument is the same as for `xdp_portal_open_file()`.

When the request is done, `callback` will be called. You can then call `xdp_portal_save_file_finish()` to get the results.

#### Parameters

`parent` | `XdpParent`
| Parent window information.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`title` | `const char*`
| Title for the file chooser dialog.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`current_name` | `const char*`
| Suggested filename.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`current_folder` | `const char*`
| Suggested folder to save the file in.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`current_file` | `const char*`
| The current file (when saving an existing file)
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`filters` | `GVariant`
| A `GVariant` describing file filters.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`current_filter` | `GVariant`
| A `GVariant` describing the current file filter.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`choices` | `GVariant`
| A `GVariant` describing extra widgets.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`flags` | `XdpSaveFileFlags`
| Options for this call.
`cancellable` | `GCancellable`
| Optional `GCancellable`
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`callback` | `GAsyncReadyCallback`
| A callback to call when the request is done.
| The argument can be `NULL`.
`data` | `gpointer`
| Data to pass to `callback`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.