exists
Signature
Section titled “Signature”io.exists(filename)Description
Section titled “Description”Checks if file or directory exists.
If you need to know specifically if a file or directory exists, use io.dirExists() or io.fileExists() instead.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| filename | string | Yes | - | The path to the file or directory to check. |
Return Values
Section titled “Return Values”| Type | Description |
|---|---|
boolean | true if the file or directory exists, false otherwise. |
Examples
Section titled “Examples”if io.exists("./file.txt") then ac.log("Exists!")end