added handling invalid invoke functions and ported a couple of apps

stopped component.invoke from throwing a cryptic error, and ported over cat, cd, clear, cp, edit, ls, lsdrv, and mkdir
This commit is contained in:
Ponali
2025-09-14 17:45:36 +02:00
parent 8244f1590c
commit 3c087aaddf
9 changed files with 49 additions and 33 deletions
+2 -2
View File
@@ -2,11 +2,11 @@ local directory = ...
local fs = require("filesystem")
if not directory then
shell.run("help mkdir")
require("shell").run("help mkdir")
return
end
if directory:sub(1, 1) ~= "/" then
directory = fs.concat(shell.workingDirectory, directory)
directory = fs.concat(require("shell").getWorkingDirectory(), directory)
end
if fs.exists(directory) then
print("\27[91mAn object already exists at the specified path.")