add mfs.type to mfs
This commit is contained in:
parent
b4d2238747
commit
94e6615afc
|
@ -45,4 +45,15 @@ function mfs.rm(x)
|
||||||
fs.delete(cd.."/"..x)
|
fs.delete(cd.."/"..x)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mfs.type(x)
|
||||||
|
if not fs.exists(cd.."/"..x) then
|
||||||
|
return "none"
|
||||||
|
end
|
||||||
|
if fs.isDir(cd.."/"..x) then
|
||||||
|
return "directory"
|
||||||
|
else
|
||||||
|
return "file"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return mfs
|
return mfs
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
["version"] = "0.1.4-1",
|
["version"] = "0.1.5",
|
||||||
["dependencies"] = {
|
["dependencies"] = {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue