richardhundt / luv

libuv bindings for Lua
Apache License 2.0
118 stars 19 forks source link

no data read out by file:read() #4

Closed miketang84 closed 11 years ago

miketang84 commented 11 years ago

why file:read() return a number, not the file data?

dvv commented 11 years ago

try print(file:read(n)) -- i believe it returns tuple so nread, str = file:read() should work

richardhundt commented 11 years ago

On Oct 8, 2012, at 5:32 PM, Vladimir Dronnikov wrote:

try print(file:read(n)) -- i believe it returns tuple so nread, str = file:read() should work

Correct.

miketang84 commented 11 years ago

great. I love luv more and more.

On Tue, Oct 9, 2012 at 12:15 AM, Richard Hundt notifications@github.comwrote:

On Oct 8, 2012, at 5:32 PM, Vladimir Dronnikov wrote:

try print(file:read(n)) -- i believe it returns tuple so nread, str = file:read() should work

Correct.

— Reply to this email directly or view it on GitHubhttps://github.com/richardhundt/luv/issues/4#issuecomment-9231026.

Nothing is impossible.