mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-15 00:12:53 +00:00

Unfortunately we can't apply the config changes due to backwards compatibility. This'll be something we may need to PR into Forge. CraftTweaker support still needs to be added.
18 lines
412 B
Lua
18 lines
412 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
|