Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. function loadEncriptedFile(filePath)   
  2.     local hFile = fileOpen(filePath)            
  3.     if hFile then                                  
  4.         local buffer = ""  
  5.         local size = fileGetSize ( hFile )
  6.         outputDebugString("Reading " .. filePath .. " bytes: 0/" .. size)
  7.         while not fileIsEOF(hFile) do              
  8.             buffer = buffer .. fileRead(hFile, 26214400)
  9.             outputDebugString("Reading " .. filePath .. " bytes: " .. #buffer .. "/" .. size)
  10.         end
  11.         fileClose(hFile)
  12.  
  13.         return buffer
  14.     else
  15.         outputConsole("Unable to open: " .. filePath)
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement