local fd = assert ( io.open ("/var/local/test,dat" , "rb" ) )
records = assert ( fd:read ( "*a" ) )
data = records:byte(offset+1)
--ffi casts
--
You received this message because you are subscribed to a topic in the Google Groups "openresty-en" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openresty-en/UtCgggxmoLY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openresty-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks a lot!
I knew about "fd:close()". But I'm not that happy that io.read returns string and a pointer :-)For a file over 200MB a pointer would be more sensible in my opinion.
So maybe a memory map file ? Would it make sense ? And how to make it released on nginx exit ?