跳轉到內容

Rebol 程式設計/size?

來自華夏公益教科書,開放的書籍,開放的世界
SIZE? target 

返回檔案或 URL 內容的大小。

SIZE? 是一個函式值。

  • 目標 -- (型別:檔案 url)

(特殊屬性)

[編輯 | 編輯原始碼]
  • 捕獲

原始碼

[編輯 | 編輯原始碼]
size?: func [
    "Returns the size of a file or URL's contents." 
    [catch] 
    target [file! url!] 
    /local info
][
    info: throw-on-error [info? target] 
    either none? info [none] [info/size]
]
華夏公益教科書