Skip to content

file.exists

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get whether a file or directory exists at the given path

Parameters

Parameter Default Value Note
path

Return value

Condition Return Value
(always) number

Notes

Example

import "file"
if file.exists("data.txt") then
    print "found it"
else
    print "not found"
end if

Clone this wiki locally