home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / internet / tcpip204 / TCPIP_Doc / Notes / FTPClient < prev    next >
Text File  |  1995-03-03  |  21KB  |  632 lines

  1. New facilities in FTP Client (v2.04)
  2. =====================================
  3.  
  4. The FTP client in !TCPIP has undergone the first stage of improvements
  5. aimed at sorted out UNIX -> RISC OS path convertion problems, and making
  6. it a bit more automated.
  7.  
  8. These include the addition of:
  9.  
  10.   A highly configurable path name processor.
  11.   A batch ftp facilty (source command).
  12.   An "mget" command.
  13.   A "reget" command.
  14.   "quote" and "site" commands.
  15.   {ftp_data} and {ftp_list} variables.
  16.  
  17. v2.04 also adds:
  18.   Preset options, set from main command window, or Config file.
  19.   Fully automatic login based on data in an FTP server accounts file.
  20.   Automatic execution of command files.
  21.   Selectable prompt types, showing current directory.
  22.   Selectable information level.
  23.   A new ftp command "aftp" that allow instant logins, and optional
  24.   command file selection.
  25.  
  26.  
  27. Pathname Processor
  28. ~~~~~~~~~~~~~~~~~~
  29. The path handling is the main area of improvement, and now allows UNIX
  30. style paths to be parsed for file type extraction from one or more file
  31. name extensions and is able to work out appropriate processing based
  32. upon the extensions present or elements in the basic file name.
  33.  
  34. On the basis of the file name and/or extensions, the ftp client can now
  35. work out what file type to give the file, which directory to store it in
  36. and whether to keep unconverted extensions, whether to keep directory
  37. elements from the original remote path etc.
  38.  
  39. When there is more than one extension, it is able to sensible use one
  40. extension to determine the file's type and another extension, or the
  41. file's name, to determine in which directory the file should be placed.
  42.  
  43. These conversions are done according to a set of rules given in a new
  44. !TCPIP resource file. (!TCPIPUser.PathEnt).
  45.  
  46. When downloading groups of files, for example, the entired contents of a
  47. directory and subdirectories containing C source files, there are often
  48. files which might end up being placed in a different directory to the
  49. rest as a consequence of name/extension base placing. As this can be
  50. undesirable, it is posible to switch off the fully automatic processing,
  51. and force preset processing according to the type of download your are
  52. doing. This is most useful when using the new batch facility.
  53.  
  54. Finally, just in case there are any problems that I have missed, the old
  55. original path name handling is still available in a rather more useable
  56. and improved form.
  57.  
  58. Whatever path processing options are in use, directories are
  59. automatically created. The lack of this was one of the most annoying
  60. problems with previous versions of the FTP client. Also filenames are no
  61. longer actively truncated, allowing advantage to be taken of such
  62. utilities as !LongFiles. With appropriate Risc OS configuration, overly
  63. long filenames will still be truncated, but by Risc OS rather than the
  64. FTP client.
  65.  
  66.  
  67. PathEnt file
  68. ~~~~~~~~~~~~
  69. The !TCPIPUser.PathEnt consist of a series of either options lines, or
  70. name matching lines. When trying to match a name or extensions, three
  71. types of matching are carried out. These are:
  72.  
  73.   1.  Match the file name to determine where to put the file.
  74.   2.  Match an extension to determine where to put the file.
  75.   3.  Match an extension to determine a file type.
  76.  
  77. The first match in each of the above categories is the one used. How
  78. this effects the layout of the PathEnt file will become clear.
  79.  
  80. Each options line starts with a "$" character and is followed by
  81. required options on the same line, each separated by a space.
  82.  
  83. There are three types of options line as follows:
  84.  
  85. $root <pathname>
  86. "$root <FTP$Dir>"
  87.  
  88. This must be present, once only. The given pathname set the root
  89. directory in which files are to be placed. Normally, this is set to
  90. "<FTP$Dir>" which in turn is set to "!TCPIPUser.Downloads".
  91.  
  92. $default [<option>...]
  93. Example: "$default nocase nfsext truncdir keepext in Misc type &fff"
  94.  
  95. This line must be present, once only. It sets the default path
  96. processing options this are modified by options given later, or applied
  97. directly to any paths that are not otherwise matched.
  98.  
  99. $ [<option>...]
  100. Example: "$ rev1ext in Source"
  101.  
  102. This line contains options that are to be applied to subsequent
  103. extension/filename decoding lines. Any options given are applied in
  104. addition to those given in the default options line.
  105.  
  106. Lines starting with a "#" character, or blank lines are ignored.
  107.  
  108. Lines starting with a "." describe extensions matching. Other lines
  109. describe filename matching.
  110.  
  111. Extension and file name matching lines are as follows:
  112.  
  113. <name>/.<ext>[|<name>/.<ext>...] <file type> [<options>]
  114. Examples: ".c|.cpp|.c++|.h|.[1-8]|.s|.y|.l &fff"
  115.           "rfc* &fff in RFCs"
  116.  
  117. "/" in the above is used to represent "or" in the syntax rather than the
  118. usual "|" as "|" is literally used to separate extensions in a list.
  119. There must be no spaces in the extensions part.
  120.  
  121. The use of wildcards is allowed in the name and extension as follows:
  122.  
  123.   "*"     matches any string of 0 or more characters.
  124.   "?"     matches any single character.
  125.   "[...]" matches a range of characters, for eg, [0-9] matches 0, 1, 2,
  126.           3 ... 9.
  127.  
  128. The file type is a valid RISC OS file type, for example, "Text" "fff",
  129. "&fff" etc.
  130.  
  131. Addition extension specific options may also be given by including the
  132. option after the file type.
  133.  
  134.  
  135. Options:
  136.  
  137.   nocase    Treat upper and lower case alike in matching
  138.  
  139.   keepext    Keep extensions as file/ext1/ext2 etc
  140.  
  141.   noext        Remove all extensions
  142.  
  143.   revext    Reverse extensions so that dir/file.a.b becomes
  144.         dir.b.a.file
  145.  
  146.   rev1ext    Reverse 1st extension only, so that app/file.c.gz
  147.         becomes app.c.file/gz
  148.  
  149.   nopath    Strip path prefix for remote name so.
  150.  
  151.   in <dir>      Places file in directory <dir>. Unless <dir> is a full
  152.                 path name, <dir> is assumed to be a sub-directory of the
  153.                 specified root directory.
  154.  
  155.   type <type>   Set the default type to be applied in the absence of any
  156.                 other information.
  157.  
  158.   nfsext        Enables the handling of Acorn NFS style ,xxx hex extensions.
  159.  
  160.  
  161. Any option prefixed with "!" is switched off rather than on.
  162.  
  163. When a type is matched, the corresponding extension is allways removed.
  164.  
  165.  
  166. An Example File
  167.  
  168.  
  169. # Set the location of the downloads directory.
  170.  
  171. $root <FTP$Dir>
  172.  
  173.  
  174. # Set default options as follows:
  175. # case-insensitive matching, handling of NFS extensions, keep
  176. # extensions as file/ext/ext unless told not to,
  177. # place unmatched file in "<FTP$Dir>.Misc"
  178. # set their type to Text (&fff)
  179.  
  180. $default nocase nfsext keepext in Misc type &fff
  181.  
  182.  
  183. # These option are applied to the following type matches until
  184. # another options lines is encountered. These options are applied in
  185. # addition to those given on the defaults line above.
  186. #
  187. # Ensure directory elements in original remote path name are stripped.
  188. # Ensure extensions are stripped, leaving just the filename.
  189. # Place matched files in directory "<FTP$Dir>.Docs"
  190. $ nopath noext in Docs
  191. .txt         &fff
  192. .doc         &fff
  193. .asc         &fff
  194. .ps          &ff5
  195.  
  196.  
  197. # A new set of options to be applied. This completely replaces those
  198. # given in the previous options line, and is applied to the following
  199. # match lines.
  200. #
  201. # Basically as above, but put files in "<FTP$Dir>.Archives"
  202.  
  203. $ nopath noext in Archives
  204. .arc         &ddc
  205. .archive     &ddc
  206. .spark       &ddc
  207. .spk         &ddc
  208. .tar.gz      &ddc
  209. .tar.z       &ddc
  210. .tar         &ddc
  211. .gz          &ddc
  212. .z           &ddc
  213. .zip         &ddc
  214.  
  215.  
  216. # A new set of options for Image files
  217. # The files end of in "<FTP$Dir>.Archives"
  218.  
  219. $ nopath noext in Images
  220. .jpeg|.jpg   &c85
  221. .gif         &695
  222. .tiff|.tif   &ff0
  223.  
  224.  
  225. # A more complicate extensions set for dealing with source file downloads.
  226. #
  227. # this matches .c, .c++, .cpp, .h, .1, .2, .3, .4, .5, .6, .7, .8,
  228. # .s, .y, and .l.
  229. #
  230. # The first extension and file name are swapped round so that you
  231. # get c.*, h.* files.
  232. #
  233. # Also, as these options *replace* previous ones, directory elements in
  234. # the original path name are retained. So applic/source.c becomes
  235. # applic.c.source.
  236.  
  237. $ rev1ext in Source
  238. .c|.cpp|.c++|.h|.[1-8]|.s|.y|.l &fff
  239.  
  240.  
  241. # Any files with "rfc" at the start of the name are placed in
  242. # "<FTP$Dir>.RFCs". Any files with "draft-" at the start of the name are
  243. # placed in "<FTP$Dir>.IENs". Also path