isfolder Synchronous

Ask whether a workspace path names an existing directory. Check it before listing a user-selected cache or export folder.

Syntax
Luau
isfolder(path: string) -> boolean

Parameters

Function parameters
ParameterTypeDescription
pathstringWorkspace-relative path to check.

Returns

boolean

true for an accessible folder; false otherwise.

Usage notes

A regular file returns false, even when the file exists.

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 = "example-settings"
if isfolder(folder) then
    print("Entries:", #listfiles(folder))
end
Kawaii documentation