Tk Library Source Code

Artifact [20e145465e]
Login

Artifact 20e145465e40eda375393d9b15d75f939555c16e:

Attachment "test_ftpchan.tcl" to ticket [481161ffff] added by andreas_kupries 2001-11-20 03:51:54.
#!/bin/sh
# \
exec tclsh

source ftp.tcl

set ftp::VERBOSE 1
## set ftp::DEBUG   1

set c [ftp::Open localhost foo bar -port 7777]

puts _________________________________________________

set out [open bar w]
ftp::Get $c MANIFEST -channel $out
close $out ; # We are responsible for the close

puts _________________________________________________

set in [open [info script] r]
ftp::Put $c -channel $in FOOBAR ; # ftp closes the channel $in

puts _________________________________________________
ftp::Close $c
exit