Lua:fileExists

From Cheat Engine
Jump to navigation Jump to search

<> Reference

function fileExists(pathtofile) : boolean

Returns true if a file exists at the specified path.

Function Parameters[edit]

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

Returns[edit]

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

Examples[edit]

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

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

See Also[edit]

Main Pages