mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
c3fd8fc9a5
* 修cost_data * 修cardMark,仍需自动清理措施 * 修锁视技( **重要!使用牌之前会根据锁视技重新决定使用的卡牌!!**)
24 lines
530 B
Lua
24 lines
530 B
Lua
-- 为纯lua的测试环境捏一个虚拟的fk以便于测试
|
|
|
|
local fk = {}
|
|
|
|
local os, io = os, io
|
|
|
|
-- 这下Linux专用了
|
|
function fk.QmlBackend_ls(dir)
|
|
local f = io.popen("ls " .. dir)
|
|
return f:read("*a"):split("\n")
|
|
end
|
|
|
|
function fk.QmlBackend_isDir(dir)
|
|
local f = io.popen("if [ -d " .. dir .. " ]; then echo OK; fi")
|
|
return f:read("*a"):startsWith("OK")
|
|
end
|
|
|
|
function fk.QmlBackend_exists(dir)
|
|
local f = io.popen("if [ -e " .. dir .. " ]; then echo OK; fi")
|
|
return f:read("*a"):startsWith("OK")
|
|
end
|
|
|
|
return fk
|