[REBOL] Re: FTP access via a port spec
From: gscottjones:mchsi at: 3-Oct-2002 18:54
Hi, Laurent,
From: "Laurent Giroud"
> I am trying to access the ftp server that my ISP set up
> so I can create my home page(s).
> Since the username contains an "@" character I have no
> choice but to use a port spec as specified in the Core user
> guide
> (http://www.rebol.com/docs/core23/rebolcore-13.html#sect11.11.)
You sound pretty frustrated. The documentation is sparse or not completely
helpful in some areas. In this case you were just one slash away from
practically being there.
page: read [
scheme: 'FTP
host: "ftp.site.com"
port-id: 21
target: %/index.php3
user: "[myusername--site--com]"
pass: "mypassword"
]
An alternative approach is to patch the code that parses more readily used
ftp code by adding "@" as being valid (watch for line wrap).
net-utils/url-parser/user-char: union net-utils/url-parser/user-char make
bitset! #"@"
With this patch you (hopefully) would be able to do something like:
print read ftp://[myusername--site--com]:[mypassword--ftp--site--dom]/index.php3
This patch may break with a future REBOL, so be aware.
There is some additional explanation
http://www.escribe.com/internet/rebol/m10936.html
<snip>
> It all seems very powerful but also very osbcure and I would
> like to know if this feeling is shared by other people on the list ?
I think that the mail list is the quickest way to get answers when the
documentation isn't helping. You are not the first to complain about the
documentation, and I doubt that you will be the last. It can be frustrating
at times, but I have found the rewards of REBOL to far outweigh the
frustrations. Your mileage may vary, of course. :-)
I would encourage you to hang in there, and feel more free to use the mail
list.
--Scott Jones