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