add mfs.type to mfs

This commit is contained in:
v 2021-01-01 19:41:57 +00:00
parent b4d2238747
commit 94e6615afc
2 changed files with 12 additions and 1 deletions

View File

@ -45,4 +45,15 @@ function mfs.rm(x)
fs.delete(cd.."/"..x)
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

View File

@ -1,5 +1,5 @@
{
["version"] = "0.1.4-1",
["version"] = "0.1.5",
["dependencies"] = {
},