isfile
Tests whether a workspace path names a regular file. This is distinct from isfolder. A positive result is a snapshot; a later read can still fail if the path changes.
Syntax
isfile(path: string) -> boolean
Also available as
is_file
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | Workspace-relative path. |
Returns
| Type | Description |
|---|---|
boolean | True for an existing regular file. |
Description
File operations are confined to the current workspace. Absolute paths and traversal outside it are not accepted. Use a file dialog when the user needs to choose an external file.
Example
print(isfile("example.txt"))
These are Game executor contracts. Check build requirements and session lifetimes before using them.
