sysutils.diskusage(drive)
Returns the disk space usage for the specified drive
Parameters
drive
The drive letter, as astring
Return value
If the function succeeds, the function returns two numbers: the current free disk space in bytes, and the total disk space in bytes. If the function fails it returns anil
value.Example
local sysutils = require "sysutils"
local free, total = sysutils.diskusage("C:")
print("Drive C: has "..math.floor(free/1000).." kb left on "..(math.floor(total/1000)).." kb")