FTP: Difference between revisions

Content added Content deleted
(Scala contribution added.)
m (→‎{{header|Perl 6}}: Change to a still active FTP host)
Line 601: Line 601:
<lang perl6>use Net::FTP;
<lang perl6>use Net::FTP;


my $host = 'speedtest.tele2.net';
my $ftp = Net::FTP.new(:host('mirrors.sohu.com'), :passive);
my $user = 'anonymous';
my $password = '';


my $ftp = Net::FTP.new( host => $host, :passive );
$ftp.login();


$ftp.login( user => $user, pass => $password );
say $_<name>for $ftp.ls();


say $_<name> for $ftp.ls;
$ftp.get( 'index.html', :binary );</lang>

$ftp.get( '5MB.zip', :binary );</lang>


{{out}}
{{out}}
<pre>
<pre>1000GB.zip
100GB.zip
CPAN
100KB.zip
FOOTER.html
100MB.zip
FreeBSD
10GB.zip
HEADER.html
10MB.zip
OpenBSD
1GB.zip
anthon
1KB.zip
apache
1MB.zip
archlinux
200MB.zip
centos
20MB.zip
cygwin
2MB.zip
dag
3MB.zip
debian
500MB.zip
debian-backports
50MB.zip
debian-cd
512KB.zip
debian-multimedia
5MB.zip
debian-security
upload</pre>
deepin
deepin-cd
fedora
fedora-epel
gentoo
help
images
index.html
mysql
nginx
opensuse
php
python
qt-all
raspbian
rsync
ubuntu
ubuntu-cn
ubuntu-releases
</pre>


=={{header|PicoLisp}}==
=={{header|PicoLisp}}==