1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-07-12 06:52:57 +00:00
2019-06-02 16:46:45 +01:00

18 lines
408 B
Lua

local tArgs = { ... }
if #tArgs < 1 then
print( "Usage: mkdir <paths>" )
return
end
for _, v in ipairs( tArgs ) do
local sNewDir = shell.resolve( v )
if fs.exists( sNewDir ) and not fs.isDir( sNewDir ) then
printError( v..": Destination exists" )
elseif fs.isReadOnly( sNewDir ) then
printError( v..": Access denied" )
else
fs.makeDir( sNewDir )
end
end