< Rebol Programming

USAGE:

PATH-THRU url 

DESCRIPTION:

Return a path relative to the disk cache.

PATH-THRU is a function value.

ARGUMENTS:

  • url -- (Type: any)

SOURCE CODE

path-thru: func [
    "Return a path relative to the disk cache." 
    url /local purl
][
    if file? url [return url] 
    if not all [purl: decode-url url purl/host] [return none] 
    rejoin [view-root/public slash purl/host slash any [purl/path ""] any [purl/target ""]]
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.