Posted 07 June 2015 - 05:28 PM
I'm running a program that calculates the amount of disk space used (not free). I get an error whenever the loop iterates over the file actually calculating:
test:9: No such file
test:9: No such file
local Disk = shell.dir ();
local DiskContents = fs.list (Disk);
local DiskSize = 0
for index, file in pairs (DiskContents) do
print ("Previous Space Calculated: "..DiskSize);
print ("Current File: "..file);
***** DiskSize = DiskSize + fs.getSize (file); ***** Line 9
end
print ("Total Disk Space Used: "..DiskSize.." of "..fs.getFreeSpace (Disk));