1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-10 15:48:36 -05:00
OC-PsychOS2/module/loadfile.lua

13 lines
208 B
Lua
Raw Normal View History

2018-11-02 12:05:41 -04:00
function loadfile(p)
local f = fs.open(p,"rb")
local c = f:read("*a")
f:close()
return load(c,p,"t")
end
function runfile(p,...)
loadfile(p)(...)
end
function spawnfile(p,n)
os.spawn(loadfile(p),n)
end