This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
FREAX/bin/type
2022-07-18 19:33:40 +02:00

17 lines
329 B
Text

local tArgs = { ... }
if #tArgs < 1 then
local programName = "type"
print("Usage: " .. programName .. " <path>")
return
end
local sPath = shell.resolve(tArgs[1])
if fs.exists(sPath) then
if fs.isDir(sPath) then
print("directory")
else
print("file")
end
else
print("No such path")
end