mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user