1<html>
2<head>
3<title>ftp Library Package 2.2 for Tcl/Tk help file</title>
4</head>
5<body bgcolor="#ffffff" text="#000000">
6<body>
7
8<p>
9<dl>
10  <dd>
11    <p><font face="Arial,Helvetica" color="#526e9c" size="+2"><b>ftp Library Package 2.1 for Tcl/Tk Manual Pages</b></font></p>
12  </dd>
13
14  <dd><font face="Arial,Helvetica" size="+1"><b>NAME</b></font></dd>
15  <dd><dl>  
16    <dd><b>ftp - Client-side tcl implementation of the ftp protocol</b></dd>
17  </dl></dd>
18  <dd>&nbsp;</dd>
19  
20  <dd><font face="Arial,Helvetica" size="+1"><b>SYNOPSIS</b></font></dd>
21  <dd><dl>
22    <dd><b>package require ftp ?2.2?</b></dd> 
23    <dd>&nbsp;</dd>
24    <dd><b>ftp::<a href="fhelp1.html">Open</b><em>&nbsp; server&nbsp; user&nbsp; passwd&nbsp; ?options?</em></a></dd>
25    <dd><b>ftp::<a href="fhelp2.html">Close</b><em>&nbsp; handle</em></a></dd>
26    <dd><b>ftp::<a href="fhelp3.html">Cd</b><em>&nbsp; handle&nbsp; directory</em></a></dd>
27    <dd><b>ftp::<a href="fhelp4.html">Pwd</b><em>&nbsp; handle</em></a></dd>
28    <dd><b>ftp::<a href="fhelp5.html">Type</b><em>&nbsp; handle&nbsp; ?ascii|binary|tenex?</em></a></dd>	
29    <dd><b>ftp::<a href="fhelp6.html">List</b><em>&nbsp; handle&nbsp; ?directory?</em></a></dd>
30    <dd><b>ftp::<a href="fhelp7.html">NList</b><em>&nbsp; handle&nbsp; ?directory?</em></a></dd>
31    <dd><b>ftp::<a href="fhelp8.html">FileSize</b><em>&nbsp; handle&nbsp; file</em></a></dd>
32    <dd><b>ftp::<a href="fhelp9.html">ModTime</b><em>&nbsp; handle&nbsp; from&nbsp; to</em></a></dd>
33    <dd><b>ftp::<a href="fhelp10.html">Delete</b><em>&nbsp; handle&nbsp; file</em></a></dd>
34    <dd><b>ftp::<a href="fhelp11.html">Rename</b><em>&nbsp; handle&nbsp; from&nbsp; to</em></a></dd>
35    <dd><b>ftp::<a href="fhelp12.html">Put</b><em>&nbsp; handle&nbsp; (local | -data "data")&nbsp; ?remote?</em></a></dd>
36    <dd><b>ftp::<a href="fhelp125.html">Append</b><em>&nbsp; handle&nbsp; (local | -data "data")&nbsp; ?remote?</em></a></dd>
37    <dd><b>ftp::<a href="fhelp13.html">Get</b><em>&nbsp; handle&nbsp; remote&nbsp; ?(local | -variable varname)?</em></a></dd>
38    <dd><b>ftp::<a href="fhelp14.html">Reget</b><em>&nbsp; handle&nbsp; remote&nbsp; ?local?</em></a></dd>
39    <dd><b>ftp::<a href="fhelp15.html">Newer</b><em>&nbsp; handle&nbsp; remote&nbsp; ?local?</em></a></dd>
40    <dd><b>ftp::<a href="fhelp16.html">MkDir</b><em>&nbsp; handle&nbsp; directory</em></a></dd>
41    <dd><b>ftp::<a href="fhelp17.html">RmDir</b><em>&nbsp; handle&nbsp; directory</em></a></dd>
42    <dd><b>ftp::<a href="fhelp18.html">Quote</b><em>&nbsp; handle&nbsp; arg1&nbsp; arg2&nbsp; ...</em></a></dd>
43    <dd><b>ftp::DisplayMsg</b><em>&nbsp; handle&nbsp; msg&nbsp; ?state? </em></dd>
44    <dd>&nbsp;</dd>
45    <dd>variable <b>ftp::VERBOSE</b></dd>
46    <dd>variable <b>ftp::DEBUG</b></dd>
47  </dl></dd>
48  <dd>&nbsp;</dd>
49
50  <dd><font face="Arial,Helvetica" size="+1"><b>DESCRIPTION</b></font></dd>
51  <dd><dl>
52    <dd>
53    	The ftp library package provides the client side of the	ftp protocol.
54	The package implements active (default) and passive ftp sessions.
55		
56	<p>A new ftp session is started with the Open</b> command. Quitting an
57	existing ftp session is done by Close</b>. All other commands can
58	only be used in an opened ftp session else an error will occured.
59	The ftp package includes file and directory manipulating commands for
60	remote sites. To do the same stuff to the local site the built-in tcl
61	commands like "cd" or "file <em>command</em>" are the best choice.</p>
62	
63	Two state variables controls the output of ftp. Setting VERBOSE</b>
64	to "1" forces to show all responses from the remote server. The default value is "0".
65	Setting DEBUG</b> to "1" enables debugging to show all the return code, states 
66	and "real" ftp commands. The default value is "0".
67	
68	<p>The procedure <b>DisplayMsg</b> is used to show the different messages from 
69	the ftp session. It is simple declared in ftp and must be overwritten
70	by the programmer to make it more comfortable. A state variable for different
71	states assigned to different colors is recommended by the author. For
72	example:</p>
73
74	<pre>.msg.text tag configure error -foreground red
75.msg.text tag configure data -foreground brown
76.msg.text tag configure control -foreground blue
77
78namespace ftp {
79    proc DisplayMsg {s msg {state ""}} {
80        switch $state {
81            data	{.msg.text insert end "$msg\n" data}
82            control	{.msg.text insert end "$msg\n" control}
83	    error	{.msg.f.text insert end "$msg\n" error}
84        }	   
85    }
86}</pre>
87    </dd> 
88  </dl></dd> 
89  
90  <dd><font face="Arial,Helvetica" size="+1" color="##ff0000"><b>BUGS</b></font></dd>
91  <dd><dl>  
92    <dd>
93	Correct execution of many commands depends upon proper behavior by the remote server, network
94	and router configuration.<p>
95	
96	An update command placed in the procedure DisplayMsg run into persistent errors or infinite loops.
97	The solution to this problem is to use "update idletasks", rather than a single update.
98      </dd>
99  </dl></dd>
100
101</dl>
102</p>
103<p align="left"><hr noshade size="1"><font face="Arial,Helvetica" size="-1">&copy; 1999 <a href="mailto:Steffen.Traeger@t-online.de">Steffen Traeger</a></font></p>
104</body>
105</html>
106
107
108