mirror of
https://github.com/TangentFoxy/lurker.git
synced 2025-07-27 18:42:18 +00:00
Update deprecated love.filesystem calls
This commit is contained in:
13
lurker.lua
13
lurker.lua
@@ -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()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user