-
-
Notifications
You must be signed in to change notification settings - Fork 5
FileExists
Anthony Headley edited this page Apr 21, 2020
·
2 revisions
Takes a full file path and returns true if the file exists and false if not.
Name | Description | Optional |
---|---|---|
string: filename | Full path of the file to check |
bool : true = file exists bool : false = file does not exist
local path = GetPath(26) -- gets the demo shows filder
-- build two shows files to look for
local files = {}
files[1] = path .. sep .. "Demoshow_Fullsize_and_Light.show"
files[2] = path .. sep .. "randomfilename.random"
-- loop through the above files and echo the result of the file
for key, value in pairs(files) do
if FileExists(value) then
Echo(value .. " - Exists")
else
Echo(value .. " - Does not exist")
end
end