Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Lua: Prevent carriage return in binary code
- file=io.open(filepath,'rb')
- file:seek("set")
- file:seek("cur",startoffset)
- filecontent=file:read(endoffset-startoffset)
- io.output(test.tmp)
- io.write(filecontent)
- local file = assert(io.open(filepath, "rb"), "Could not open file for reading.")
- local filecontent = file:read("*a")
- file:close()
- file = assert(io.open("temp.tmp", "wb"), "Could not open file for writing.")
- file:write(filecontent)
- file:close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement