### 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.

This method completes asynchronously. Use `xdp_portal_save_file_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`parent`

  Type: `XdpParent`

  Parent window information.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`title`

  Type: `const char*`

  Title for the file chooser dialog.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`current_name`

  Type: `const char*`

  Suggested filename.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`current_folder`

  Type: `const char*`

  Suggested folder to save the file in.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`current_file`

  Type: `const char*`

  The current file (when saving an existing file).

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`filters`

  Type: `GVariant`

  A `GVariant` describing file filters.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`current_filter`

  Type: `GVariant`

  A `GVariant` describing the current file filter.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`choices`

  Type: `GVariant`

  A `GVariant` describing extra widgets.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`flags`

  Type: `XdpSaveFileFlags`

  Options for this call.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  A callback to call when the request is done.

  The argument can be `NULL`.

`data`

  Type: `gpointer`

  Data to pass to `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.