ui.savedialog([title], [allow_multiple_selection], [filters])function
Displays a dialog box for the user to specify the drive, directory, and name of a file to save.
Parameters
[title]
An optional string that indicates the title of the dialog box (use the default system title if not specified).
[allow_multiple_selection]
An optional boolean value that indicates if the dialog allow multiple files selection or not.
[filters]
An optional string that indicates filters. A filter is used to display only files with a specified pattern. If omitted, the dialog shows all files.
A filter is composed of a
Return value
This function returns the selected file(s) as File object(s) or nil if no files have been choosen.Example
--! luart-extensions
import ui
-- open a dialog to choose a file to be saved
local file = ui.savedialog("Save current date to...")
-- checks if a file has been selected
if file ~= nil then
-- open the file and write the current date & time to it
file:open("write"):write(sys.Datetime())
end