I forgot you have to give it write permissions (minified)
This commit is contained in:
+1
-15
@@ -1,15 +1 @@
|
||||
local file = ...
|
||||
local fs = import("filesystem")
|
||||
|
||||
if not file then
|
||||
shell.run("help rm")
|
||||
return
|
||||
end
|
||||
if file:sub(1, 1) ~= "/" then
|
||||
file = fs.concat(shell.workingDirectory, file)
|
||||
end
|
||||
if not fs.exists(file) then
|
||||
print("\27[91mFile does not exist.")
|
||||
return
|
||||
end
|
||||
fs.remove(file)
|
||||
Error: no such file. (``)
|
||||
|
||||
Reference in New Issue
Block a user