Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local fs = require("filesystem")
- local file = ...
- size = fs.size(file)
- pre=""
- if size >= 1024 then
- size = size / 1024
- size = tostring(size)
- local point = size:find(".")
- if point ~= nil then
- size=size:sub(1,point+2)
- end
- local pre="kilo"
- size=tonumber(size)
- end
- print("File size of " .. file .. " is " .. size .. " ".. pre .." bytes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement