AIRBOSS, RECOVERYTANKER, RESCUEHELO, RANGE

AIRBOSS v0.9.3
RECOVERYTANKER v1.0.6
RESCUEHELO v1.0.4
RANGE v1.2.4
SPAWN added modex
GROUP added modex respawn
This commit is contained in:
Frank
2019-01-30 20:10:41 +01:00
parent bcfa0f9ac5
commit e325b2192b
9 changed files with 533 additions and 178 deletions

View File

@@ -890,4 +890,19 @@ function UTILS.GetMagneticDeclination(map)
return declination
end
--- Checks if a file exists or not. This requires **io** to be desanitized.
-- @param #string file File that should be checked.
-- @return #boolean True if the file exists, false if the file does not exist or nil if the io module is not available and the check could not be performed.
function UTILS.FileExists(file)
if io then
local f=io.open(file, "r")
if f~=nil then
io.close(f)
return true
else
return false
end
else
return nil
end
end