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.

Syntax
Luau
Document:MakeFolder(name: string) -> Document

Parameters

Call this method with a Document receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.

Function parameters
ParameterTypeDescription
namestringName of the new child folder.

Returns

Document

A 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

Example
Luau
local parent = openfolderdialog()
if parent then
    local exports = parent:MakeFolder("Example exports")
    print("Created:", exports:GetName())
end
Kawaii documentation