v1.4.0 - Added better path handling to the filesystem library, cleaned up mv, cp, cd, cat and their help files.

This commit is contained in:
TheWahlolly
2025-05-22 21:00:38 +03:00
parent f52d0f7015
commit 500419de59
12 changed files with 95 additions and 86 deletions
+2 -4
View File
@@ -1,6 +1,4 @@
local args = {...}
local directory = args[1]
args = nil
local directory = ...
local fs = import("filesystem")
if not directory then
@@ -8,7 +6,7 @@ if not directory then
return
end
if directory:sub(1, 1) ~= "/" then
directory = shell.workingDirectory .. directory
directory = fs.concat(shell.workingDirectory, directory)
end
if fs.exists(directory) then
print("\27[91mAn object already exists at the specified path.")