mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-22 21:17:33 +00:00
23 lines
416 B
Lua
23 lines
416 B
Lua
|
-- Copyright (c) 2019-2022 David Vogel
|
||
|
--
|
||
|
-- This software is released under the MIT License.
|
||
|
-- https://opensource.org/licenses/MIT
|
||
|
|
||
|
---@class Utils
|
||
|
local Utils = {}
|
||
|
|
||
|
---Returns if the file at filePath exists.
|
||
|
---@param filePath string
|
||
|
---@return boolean
|
||
|
function Utils.FileExists(filePath)
|
||
|
local f = io.open(filePath, "r")
|
||
|
if f ~= nil then
|
||
|
io.close(f)
|
||
|
return true
|
||
|
else
|
||
|
return false
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return Utils
|