Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- fs = component.filesystem
- usedSpace = fs.spaceUsed()
- totalSpace = fs.spaceTotal()
- percentUsed = (usedSpace/totalSpace)*100
- function round (num, numDecimalPlaces)
- local mult = 10^(numDecimalPlaces or 0)
- return math.floor(num * mult + 0.5) / mult
- end
- print(usedSpace .. " bytes of your harddrive are being used, it is " .. round(percentUsed, 2) .. "% full.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement