FTP: Difference between revisions

Content added Content deleted
(Add Nim)
Line 574: Line 574:
but using an url with slash on the end with the ftp protocol causes a dir listing by default.
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>
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}}==
=={{header|Perl}}==