aboutsummaryrefslogtreecommitdiff
path: root/doc/ftp.html
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-20 22:19:54 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-20 22:19:54 +0000
commitf7579db9e830ef41f422a280d26c9077f48728e5 (patch)
treed96affac7f5e8203d2e9c4a053213a992cd76650 /doc/ftp.html
parent5dc5c3ebe8f111bba01762ca0f5edba912c4f0b9 (diff)
downloadluasocket-f7579db9e830ef41f422a280d26c9077f48728e5.tar.gz
luasocket-f7579db9e830ef41f422a280d26c9077f48728e5.tar.bz2
luasocket-f7579db9e830ef41f422a280d26c9077f48728e5.zip
Fixing bugs...
Diffstat (limited to 'doc/ftp.html')
-rw-r--r--doc/ftp.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/ftp.html b/doc/ftp.html
index 14a3601..fe514e9 100644
--- a/doc/ftp.html
+++ b/doc/ftp.html
@@ -14,7 +14,7 @@
14<center> 14<center>
15<table summary="LuaSocket logo"> 15<table summary="LuaSocket logo">
16<tr><td align=center><a href="http://www.lua.org"> 16<tr><td align=center><a href="http://www.lua.org">
17<img border=0 alt="LuaSocket" src="luasocket.png"> 17<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
18</a></td></tr> 18</a></td></tr>
19<tr><td align=center valign=top>Network support for the Lua language 19<tr><td align=center valign=top>Network support for the Lua language
20</td></tr> 20</td></tr>
@@ -227,10 +227,10 @@ message describing the reason for failure.
227-- load the ftp support 227-- load the ftp support
228local ftp = require("ftp") 228local ftp = require("ftp")
229 229
230-- Log as user "diego" on server "ftp.tecgraf.puc-rio.br", 230-- Log as user "fulano" on server "ftp.example.com",
231-- using password "nehab", and store a file "README" with contents 231-- using password "silva", and store a file "README" with contents
232-- "wrong password, of course" 232-- "wrong password, of course"
233f, e = ftp.put("ftp://diego:nehab@ftp.tecgraf.puc-rio.br/README", 233f, e = ftp.put("ftp://fulano:silva@ftp.example.com/README",
234 "wrong password, of course") 234 "wrong password, of course")
235</pre> 235</pre>
236 236
@@ -239,13 +239,13 @@ f, e = ftp.put("ftp://diego:nehab@ftp.tecgraf.puc-rio.br/README",
239local ftp = require("ftp") 239local ftp = require("ftp")
240local ltn12 = require("ltn12") 240local ltn12 = require("ltn12")
241 241
242-- Log as user "diego" on server "ftp.tecgraf.puc-rio.br", 242-- Log as user "fulano" on server "ftp.example.com",
243-- using password "nehab", and append to the remote file "LOG", sending the 243-- using password "silva", and append to the remote file "LOG", sending the
244-- contents of the local file "LOCAL-LOG" 244-- contents of the local file "LOCAL-LOG"
245f, e = ftp.put{ 245f, e = ftp.put{
246 host = "ftp.tecgraf.puc-rio.br", 246 host = "ftp.example.com",
247 user = "diego", 247 user = "fulano",
248 password = "nehab", 248 password = "silva",
249 command = "appe", 249 command = "appe",
250 argument = "LOG", 250 argument = "LOG",
251 source = ltn12.source.file(io.open("LOCAL-LOG", "r")) 251 source = ltn12.source.file(io.open("LOCAL-LOG", "r"))