FTP: Difference between revisions
Content added Content deleted
m (omit) |
(→{{header|Ruby}}: Added Ruby) |
||
Line 160: | Line 160: | ||
write/binary %README read/binary ftp://kernel.org/pub/linux/kernel/README |
write/binary %README read/binary ftp://kernel.org/pub/linux/kernel/README |
||
</lang> |
</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}}== |
=={{header|Tcl}}== |