save_files


Description:

public async Variant save_files (Parent? parent, string title, string? current_name, string? current_folder, Variant files, Variant? choices, SaveFileFlags flags, Cancellable? cancellable) throws Error

Asks for a folder as a location to save one or more files.

The names of the files will be used as-is and appended to the selected folder's path in the list of returned files. If the selected folder already contains a file with one of the given names, the portal may prompt or take some other action to construct a unique file name and return that instead.

The format for the choices argument is the same as for [method@Portal.open_file].

When the request is done, callback will be called. You can then call [method@Portal.save_file_finish] to get the results.

Parameters:

this

a [class@Portal]

parent

parent window information

title

title for the file chooser dialog

current_name

suggested filename

current_folder

suggested folder to save the file in

files

An array of file names to be saved

choices

a [struct@GLib.Variant] describing extra widgets

flags

options for this call

cancellable

optional [class@Gio.Cancellable]

callback

a callback to call when the request is done

data

data to pass to callback