Rebol 编程/do-thru
外观
< Rebol 编程
DO-THRU url /args arg /update /check info /boot
从磁盘缓存执行网络文件。
DO-THRU 是一个函数值。
- url -- (类型:url 文件)
- /args
- arg -- (类型:任何)
- /update -- 强制从源站点更新
- /check -- 仅当版本、校验和/安全或日期/大小不匹配时更新。
- info -- (类型:任何)
- /boot -- 作为引导脚本运行(设置 system/options/path)
do-thru: func [
"Do a net file from the disk cache."
url [url! file!]
/args arg
/update "Force update from source site"
/check {Update only if version, checksum/secure, or date/size do not match.} info
/boot "Run as boot script (sets system/options/path)"
/local data
][
if not data: either update [
read-thru/update/expand url
] [
read-thru/check/expand url info
] [
alert reform ["Cannot run" url]
return none
]
url: path-thru url
if boot [system/options/path: first split-path url]
do/args url arg
]