isfolder Synchronous
Check whether a workspace path points to an existing folder. This is useful before listing a directory or when separating folders from files. Use listfiles after this check when you need the folder contents. A path pointing to a file is false even if that file exists.
Luau
isfolder(path: string) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
path | string | Workspace-relative folder path to check. An empty string refers to the workspace root. |
Returns
booleantrue for a folder; false for a file, a missing path, or a rejected path.
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
Luau
if isfolder("preferences") then
for _, path in ipairs(listfiles("preferences")) do
print(path)
end
end