Skip to content
Saiko

openfilesdialog

Opens a dialog for the user to pick several files, and returns them as an array. Only the calling thread waits until the dialog is dismissed.

Signature

luau
openfilesdialog(options: fileDialogOptions?): { file }?

Parameters

optionsfileDialogOptions?

Optional: the window title, the folder it opens in and the file types that can be picked.

Returns

{ file }?

Note

Example

luau
local files = openfilesdialog({
    extensionFilter = { "png", "jpg" },
})

if files then
    for _, file in files do
        print(file:GetName())
    end
else
    print("Nothing selected.")
end