Document: MakeFolder Synchronous
Create a child directory inside the selected folder and keep the returned handle for the new location. It is useful for grouping a set of exports.
Luau
Document:MakeFolder(name: string) -> DocumentParameters
Call this method with a Document receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
| Parameter | Type | Description |
|---|---|---|
name | string | Name of the new child folder. |
Returns
DocumentA Document handle for the newly created folder.
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.
Calling MakeFolder on a file raises.
Example
Luau
local parent = openfolderdialog()
if parent then
local exports = parent:MakeFolder("Example exports")
print("Created:", exports:GetName())
end