Jump to content

Recommended Posts

print("open")
local hfile,msg = GLOBAL.io.open("./scripts_readme.txt", "a")
if hfile then
    print("write")
    hfile:write("append")-- not work
    hfile:close()
end
print("open")
local hfile,msg = GLOBAL.io.open("./scripts_readme.txt", "w")-- !!!attention scripts_readme.txt is cleared
if hfile then
    print("seek")
    hfile:seek("end")-- force crash
    print("write")
    hfile:write("append end")
    hfile:close()
end


...
[00:00:02]: open    
[00:00:02]: write    
[00:00:02]: open    
[00:00:02]: seek    
end of file

 

io.open() mode "a" is not work

file:seek is crash without error message

Edited by castlelord

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...