[REBOL] Re: Reading empty directories via FTP error
From: carl:cybercraft at: 24-Dec-2003 22:45
On 09-Nov-03, Gabriele Santilli wrote:
> Hi Carl,
> On Sunday, November 9, 2003, 5:37:38 AM, you wrote:
>> Anyway, I've found I get an empty block returned if I use a port
>> instead of an URL, so that provides a way around it. Would've
>> easier using an URL though...
> When using the URL, did you try both with and without the trailing
> slash? (My guess is that you get the error without the trailing
> slash.)
Yep - tried both. And I was wrong about using a port... Grrr. Here's
my current test script...
rebol: []
x: err: try [read [
scheme: 'ftp
host: "..."
user: "..."
pass: "..."
path: %/d/
]]
probe x
and this is the error I get if there's nothing in the d directory...
>> probe disarm err
make object! [
code: 501
type: 'access
id: 'not-open
arg1: "Port^@"
arg2: none
arg3: none
near: [read [
scheme: 'ftp
host: "..."
user: "..."
pass: "..."
path: %/d/
]]
where: 'parse-dir-list
]
Put a file in the d directory and it works fine! I'm picking there's
something wrong with parse-dir-list, which you can look at using
source, but it's code is way beyond me.
--
Carl Read