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/df
2022-07-18 19:33:40 +02:00

12 lines
483 B
Text

local tArgs = {...}
local sz = fs.getSize(shell.dir())
local fspc = fs.getFreeSpace(shell.dir())
kerneldraw.printAppInfo("type", fs.getDrive(shell.dir()))
if search.findValue(tArgs, "-sB") then
kerneldraw.printAppInfo("size", tostring(sz).." B")
kerneldraw.printAppInfo("free space", tostring(fspc).." B")
elseif search.findValue(tArgs, "-sKB") then
kerneldraw.printAppInfo("size", tostring(sz/1024).." KB")
kerneldraw.printAppInfo("free space", tostring(fspc/1024).." KB")
end