isfile Synchronous
Check whether a workspace path points to an existing file. Use it before reading optional data or to distinguish files from folders in a directory listing. A false result means the path is not an accessible file under the workspace rules; it is not a detailed explanation of why access failed.
Luau
isfile(path: string) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
path | string | Path inside the Kawaii workspace, for example settings/theme.json. |
Returns
booleantrue for a regular file; false for a folder, a missing path, or a path rejected by the filesystem.
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 isfile("preferences.json") then
local settings = json.decode(readfile("preferences.json"))
print(settings.theme)
end