add filesystem

This commit is contained in:
unknown
2022-02-13 00:31:20 -05:00
parent ef2ceed755
commit 4cfacb1abc
19 changed files with 148 additions and 16 deletions

View File

@ -0,0 +1,7 @@
{
"name": "mkdir",
"license": "MIT",
"version": 0.1,
"engine": 0.4,
"help": "makes a dir in the current path"
}

View File

@ -0,0 +1,12 @@
function mkdir(pos, input, data)
local path = computers.devicepath .. "/" .. minetest.hash_node_position(pos) .. data.element.pwd
if input and input ~= "" and not input:find("/") then
minetest.mkdir(path .. "/" .. input)
return "folder " .. input .. " created"
else
return "invalid or missing input"
end
end
return mkdir