Document: IsFolder Synchronous
Check whether a Document points to a directory before asking for its children or creating a subfolder.
Luau
Document:IsFolder() -> booleanParameters
Call this method with a Document receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
This function takes no arguments.
Returns
booleantrue for a folder; false for a file.
Usage notes
A Document is a handle to the user-selected location, not a workspace path. Call methods with a colon and keep the handle for later operations.
Example
Luau
local folder = openfolderdialog()
if folder then
for _, child in ipairs(folder:List()) do
if child:IsFolder() then print("Folder:", child:GetName()) end
end
end