function File.SplitBinary(filePath, folderPath, size, CallbackFunction) local fileSize = File.GetSize(filePath); local fileName = String.SplitPath(filePath).Filename..String.SplitPath(filePath).Extension.."."; local realpart = io.open(filePath, "rb"); local size = size*(2^20); if fileSize < size then return -1, "Split size can't be greater than filesize"; end local r = fileSize%size; local n = (r==0) and math.floor((fileSize/size)) or math.floor((fileSize/size))+1; for x=1, n do if CallbackFunction ~= nil then CallbackFunction(x, n, math.floor((x/n)*100, 0)); end local cfileName = string.format("%0"..#tostring(n).."d", x); local curFile = io.open(folderPath.."\\"..fileName..cfileName, "wb"); local bytes = (x