Hi Anton, Elan, Nenad,

That particular parse-url is in the system/view/vid object. read-via is also
in the same object. (it is not the same as the one in net-utils, though it
does call that one)

>> f: get in system/view/vid 'parse-url
>> source f
f: func [url /local purl][
    net-utils/url-parser/parse-url
    purl: context [user: pass: host: port-id: path: target: none] url
    if all [purl/target purl/host] [purl]
]

To explore Vid a bit more you can print it to a file.

echo %vid.txt
probe system/view/vid
echo none

;Happy reading!

Cheers,

Allen K








----- Original Message -----
From: "Anton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 1:33 AM
Subject: [REBOL] 'parse-url - where defined?


> Hi,
>
> Looking at
> source read-via
>
> It uses 'parse-url in the second line of read-via's function body.
> Where does parse-url come from?
> On the console, parse-url has no value.
> How then, does read-via work?
>
> my system/version == 0.10.38.3.1
>
> >> parse-url
> ** Script Error: parse-url has no value.
> ** Where: parse-url
>
> >> source read-via
> read-via: func [
>     {Read a file via the cache. Returns binary. Failure returns error.}
>     url [url! file!]
>     /progress callfunc port-hand
>     /update "Force update from source site"
>     /local path file data purl loc-path
> ][
>     if file? url [return read url]
>     if none? purl: parse-url url [return none]
>     loc-path: rejoin [system/options/home/public "/" purl/host "/" any
> [purl/path ""]]
>     file: join loc-path purl/target
>     path: rejoin ["/" any [purl/path ""] purl/target]
>     either all [not update exists? file] [data: read/binary file] [
>         data: either progress [read-net/progress url :callfunc port-hand]
> [read-net url]
>         if data [
>             if not exists? loc-path [make-dir/deep loc-path]
>             write/binary file data
>         ]
>     ]
>     data
> ]
>
> Anton.
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to