OC-PsychOS2/module/loadfile.lua
2018-11-03 03:05:41 +11:00

13 lines
208 B
Lua

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