ui.selectdir([prompt])function
Displays a shell dialog box to choose a folder.
Parameters
[prompt]
An optional string that gives the user indication for the selection.
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.selectdir("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