Jump to content

Rebol Programming/launch-thru

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
LAUNCH-THRU url /update /check info 

DESCRIPTION:

[edit | edit source]

Launch a net file from the disk cache.

LAUNCH-THRU is a function value.

ARGUMENTS:

[edit | edit source]
  • url -- (Type: url file)

REFINEMENTS:

[edit | edit source]
  • /update -- Force update from source site
  • /check -- Update only if version, checksum/secure, or date/size do not match.
    • info -- (Type: any)

SOURCE CODE

[edit | edit source]
launch-thru: func [
    "Launch a net file from the disk cache." 
    url [url! file!] 
    /update "Force update from source site" 
    /check {Update only if version, checksum/secure, or date/size do not match.} info 
    /local data
][
    if not data: either update [
        read-thru/update/expand url
    ] [
        read-thru/check/expand url info
    ] [
        alert reform ["Cannot launch" url] 
        return none
    ] 
    launch/secure-cmd path-thru url
]