FileSaveDialog
Displays a file save dialog.
Syntax
-
FileSaveDialog(fn, filters[, defext])-
fnis a string -
filtersis a list of strings -
defextis a string
-
Description
FileSaveDialog displays a file save dialog in which the user can select a file name.
-
fnis the default file name. -
filtersis a list of file type filters. Each filter is a string of the formtext|maskwheretextis the displayed text of the filter (such as “Text files”), andmaskis the file name mask (such as “*.txt”). -
If specified,
defextis the default file name extension, including or excluding a leading full stop. If the user doesn’t specify an extension, this one is automatically appended to the result unless the filter dictates a different extension, which is then appended instead. The filter’s first extension is used in that case. Ifdefextis not specified, no extension is automatically appended.
If the user selects a file name, it is returned by the function as a string. If the user cancels the dialog, an error is raised, which can optionally be handled using the try or the succeeded function.