Question about lua socket ftp example.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Question about lua socket ftp example.
- From: albert <albert_200200@...>
- Date: 2013年3月13日 10:29:51 +0800
The example code is in the link:
http://w3.impa.br/~diego/software/luasocket/old/luasocket-2.0-beta/ftp.html
1 require("ftp")
2 require("ltn12")
3 require("url")
4 function ls(u)
5 local t= {}
6 local p = socket.url.parse(u)
7 p.command = "nlst"
8 p.sink = ltn12.sink.table(t)
9 local r, e = socket.ftp.get(p)
10 return r and table.concat(t), e
11 end
I don't understand line 10, Does that mean "return (r and
table.concat(t)), e"?
r is a string, Then what does "r and table.concat(t)" mean?