isfile
Checks whether a file exists in Workspace.
Syntax
Signature
isfile(Path: string) -> booleanAliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Path | string | Path relative to the sandboxed Workspace. |
Returns
| Type | Description |
|---|---|
boolean | True for an existing regular file. |
Notes
A missing path returns false. Invalid paths and filesystem errors raise a Luau error.
Example
Luau
local Result = isfile("Example.txt")
print(Result)