openfilesdialog
Asks the user to select multiple files.
Syntax
openfilesdialog(options: table?) -> {DialogItem}?
Parameters
| Parameter | Type | Description |
|---|---|---|
options | table? | Dialog title, initial location and extension preferences. |
Returns
| Type | Description |
|---|---|
{DialogItem}? | Selected items, or nil on cancellation. |
Description
The options table accepts title, defaultPath, suggestedName, defaultExtension and extensionFilter. The extension filter is a list of extensions, for example {"txt", "json"}. The dialog yields while waiting for the user. Canceling returns nil and does not grant access to a path.
Returned items expose methods for the selected file or folder. They are not arbitrary filesystem paths. External changes to the selected object can invalidate an item.
Example
local item = openfilesdialog({ title = "Choose files" })
if item then print(#item) end
These are Game executor contracts. Check build requirements and session lifetimes before using them.
