FileDialog is used to prompt for file and directory selections. This class isn't actually a dialog, it merely defines the various options used to open the operating system's native file dialog.
const File? dir
The initial directory to display
const Str? filterExts := null
File extensions to display, for example:
filterExts = ["*.gif", "*.png", "*.jpg"]
new make(|This|? f := null)
const FileDialogMode mode := FileDialogMode.openFile
Mode is used to define whether we are opening or saving a single file, multiple files, or a directory.
const Str? name
The initial filename to display
Return the user selection or null if canceled. Result is based on mode:
- openFile: File
- openFiles: File
- saveFile: File
- openDir: File