FTP: Difference between revisions

355 bytes added ,  4 years ago
Add Nim
(Add Nim)
Line 574:
but using an url with slash on the end with the ftp protocol causes a dir listing by default.
put libURLftpCommand("PWD",ftp.example.org)</lang>
 
=={{header|Nim}}==
 
{{works with|Nim|1.0.6}}
 
<lang nim>import asyncdispatch, asyncftpclient
 
proc main {.async.} =
let ftp = newAsyncFtpClient("speedtest.tele2.net", user = "anonymous")
await ftp.cd("upload")
echo await ftp.listDirs()
let filename = "1KB.zip"
ftp.retrFile(src = filename, dest = filename)
ftp.close()
 
waitFor main()</lang>
 
=={{header|Perl}}==
Anonymous user