Lua:fileExists

From Cheat Engine
Revision as of 16:43, 21 June 2026 by Leunsel (talk | contribs) (Initial page creation.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<> Reference

function fileExists(pathtofile) : boolean

Returns true if a file exists at the specified path.

Function Parameters

Parameter Type Description
pathtofile String The path to the file to check.

Returns

boolean — True if a file exists at the specified path, otherwise false.

Examples

local path = "C:\\\\Temp\\\\example.txt"

if fileExists(path) then
  print("File exists")
else
  print("File does not exist")
end

See Also

Main Pages