23 lines
287 B
Lua
23 lines
287 B
Lua
local mfs={}
|
|
|
|
function mfs.read(x)
|
|
local f=fs.open(x,"r")
|
|
if not f then return nil end
|
|
local i=f.readAll()
|
|
f.close()
|
|
return i
|
|
end
|
|
|
|
function mfs.write(x,v)
|
|
local f=fs.open(x,"w")
|
|
f.write(v)
|
|
f.close()
|
|
end
|
|
|
|
function mfs.mmkdir(x)
|
|
if not fs.exists(x) then
|
|
fs.makeDir(x)
|
|
end
|
|
end
|
|
|