Document: MakeFolder Synchronous
Create a child folder inside the selected folder and return its handle. Use it to organize exports beneath a folder the user selected. The returned handle can be listed or used to create another level of folders.
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 child folder to create. |
Returns
DocumentA Document handle for the child folder. Calling this on a file raises an error.
Usage notes
Document is a handle returned by a file dialog or a folder method. Call its methods with a colon, for example document:Read(). After Delete succeeds, that handle is invalid and further method calls raise an error.
Example
Luau
local folder = openfolderdialog()
if folder then
local exports = folder:MakeFolder("Example exports")
print("Export folder:", exports:GetName())
end