Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Rebol and FTP (recursive stuff in particular)

From: holger:rebol at: 14-Dec-2000 8:23

On Thu, Dec 14, 2000 at 01:42:41PM +0000, Mat Bettinson wrote:
> Hi folks, > > I'd like to write a backup script that backs up the files on an FTP > site. This because my cheap mass hosting has already dumped > everyone's files. :-/ > > Anyhow, there's no shortage of recursive directory routines lying > around the place. Unfortunately they don't work with web sites. The > reason for that being that Rebol appears to keep trying to open fresh > FTP sessions every time you reference a URL - even if there's a > current session logged into the same site. This seems like stupid > behavior given it doesn't logout any of these threads either.
No, REBOL caches and reuses the FTP control connection across subsequent accesses to the same host and directory. A new data connection has to be created for each file being transfered. That is not a limitation of REBOL, but rather a requirement of the FTP protocol. The only situation when REBOL creates a new control connection is when you change directories. That is necessary because FTP provides no standard way to remotely navigate through the directory tree (in particular up the tree) without side effects. -- Holger Kruse [holger--rebol--com]