OC-PsychOS2/module/loadfile.lua

13 lines
208 B
Lua
Raw Normal View History

2018-11-03 03:05:41 +11: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