Check Path Existence (LCC.web_file.exists)
Signature
type_or_false = LCC.web_file.exists(path, timeout?)
Parameters
- path
String. File or directory to check. - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- type_or_false
String or boolean. Returns"file"or"directory"when present, otherwisefalse.
Notes
Checks whether a path exists and returns its type.
Only presence and type are returned; network failures also yieldfalse.
Example
local typ = LCC.web_file.exists("/scripts/main.lua")
if typ == "file" then
print("Script found")
end