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": "ls",
"license": "MIT",
"version": 0.1,
"engine": 0.4,
"help": "lists out all files and folders in the current path"
}

View File

@ -0,0 +1,9 @@
function ls(pos, input, data)
local path = computers.devicepath .. "/" .. minetest.hash_node_position(pos) .. data.element.pwd
--make dir to be safe
minetest.mkdir(path)
return table.concat(minetest.get_dir_list(path), " ")
end
return ls