delfolder Synchronous

Delete a workspace folder and its descendants. Reserve it for a directory your script owns, such as a disposable cache or temporary export tree.

Syntax
Luau
delfolder(path: string) -> ()

Parameters

Function parameters
ParameterTypeDescription
pathstringWorkspace-relative folder to remove recursively.

Returns

()

No values.

Usage notes

A missing folder is ignored. Existing child files and nested folders are deleted as part of the operation.

Differences from Volt

Volt documents access through explicitly created workspace symlinks. Kawaii rejects symlinks in workspace paths; all workspace operations remain subject to its path containment checks.

Example

Example
Luau
local folder = "disposable-example-cache"
makefolder(folder)
writefile(folder .. "/entry.txt", "Temporary")
delfolder(folder)
print("Cache removed:", not isfolder(folder))
Kawaii documentation