openfiledialog
Opens a dialog for the user to pick a file from anywhere on their computer, and returns it. Only the calling thread waits until the dialog is dismissed.
Signature
openfiledialog(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
print("Pick a config to use")
local config
local configFile = openfiledialog({
extensionFilter = { "json" },
})
if configFile then
config = configFile:Read()
else
print("No config selected.")
end