ui.dirdialog([title], [path])function
Displays a Windows dialog for the user to choose a directory.
Parameters
[title]
An optional string that provides a dialog title.
[path]
An optional Directory or string that indicates the folder selected when the dialog shows.
Return value
The function returns the selected folder as a Directory object or nil if the user selected none.Example
--! luart-extensions
import ui
-- open a dialog to choose an existing folder
local dir = ui.dirdialog("Please select a folder to count its entries : ")
-- checks if a folder has been selected
if dir ~= nil then
-- Outputs the number of the directory entries
ui.info("The choosen folder contains "..#dir.." entries")
end