Hello everyone,
I want to know if there is any way to know the exact size of individual files.
function M.CheckFileFun(TheOrder)
local ReData = "NotExist"
local path = system.pathForFile(TheOrder, system.DocumentsDirectory )
local fhd = io.open( path, "r" )
if fhd then
fhd:close()
ReData = "Exist"
end
return ReData
end
I now use this method to find out if the file exists, so that players don’t download it repeatedly.
But now I have an update data area for emergency use, so that I can put the update file after the bug appears after selling.
I am using Aws S3, I can know the size of the data being downloaded.
I want to use the size of the new data to compare the size of the old data to prevent players from downloading it repeatedly.
Although the data files for emergency updates are small, if players are repeatedly downloaded, over time, it will be a huge cost.