Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/FTP/Lingo/ftp.lingo
Normal file
18
Task/FTP/Lingo/ftp.lingo
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
CURLOPT_URL = 10002
|
||||
ch = xtra("Curl").new()
|
||||
url = "ftp://domain.com"
|
||||
|
||||
-- change to remote dir "/foo/bar/"
|
||||
put "/foo/bar/" after url
|
||||
|
||||
ch.setOption(CURLOPT_URL, url)
|
||||
res = ch.exec(1)
|
||||
|
||||
-- print raw FTP listing as string
|
||||
put res.readRawString(res.length)
|
||||
|
||||
-- download file "download.mp3" (passive mode is the internal default behavior)
|
||||
filename = "download.mp3"
|
||||
ch.setOption(CURLOPT_URL, url & filename)
|
||||
ch.setDestinationFile(_movie.path & filename)
|
||||
res = ch.exec()
|
||||
Loading…
Add table
Add a link
Reference in a new issue