FTP: Difference between revisions
→{{header|Ruby}}: Added Ruby
m (omit) |
(→{{header|Ruby}}: Added Ruby) |
||
Line 160:
write/binary %README read/binary ftp://kernel.org/pub/linux/kernel/README
</lang>
=={{header|Ruby}}==
<lang ruby>require 'net/ftp'
Net::FTP.open('ftp.ed.ac.uk', "anonymous","aaa@gmail.com" ) do |ftp|
ftp.passive = true
ftp.chdir('pub/courses')
ftp.list.each{|e| puts e}
ftp.getbinaryfile("make.notes.tar")
end</lang>
The connection is closed automatically at the block the end of the block.
=={{header|Tcl}}==
|