2022-07-23 15:36:21 +00:00
|
|
|
-- Copyright (c) 2019-2022 David Vogel
|
|
|
|
--
|
|
|
|
-- This software is released under the MIT License.
|
|
|
|
-- https://opensource.org/licenses/MIT
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2022-07-23 15:57:44 +00:00
|
|
|
function Utils.NoitaSpecialDirectory()
|
|
|
|
-- TODO: Implement NoitaSpecialDirectory function
|
|
|
|
end
|
|
|
|
|
2022-07-23 15:36:21 +00:00
|
|
|
return Utils
|