Update deprecated love.filesystem calls

This commit is contained in:
CaptainKraft
2020-06-04 19:48:30 -05:00
parent 4e34f47f9e
commit 8c64b399b4

View File

@@ -15,9 +15,17 @@ local lurker = { _version = "1.0.1" }
local dir = love.filesystem.enumerate or love.filesystem.getDirectoryItems local dir = love.filesystem.enumerate or love.filesystem.getDirectoryItems
local isdir = love.filesystem.isDirectory
local time = love.timer.getTime or os.time local time = love.timer.getTime or os.time
local lastmodified = love.filesystem.getLastModified
local function isdir(path)
local info = love.filesystem.getInfo(path)
return info.type == "directory"
end
local function lastmodified(path)
local info = love.filesystem.getInfo(path, "file")
return info.modtime
end
local lovecallbacknames = { local lovecallbacknames = {
"update", "update",
@@ -259,4 +267,3 @@ end
return lurker.init() return lurker.init()