跳轉到內容

Rebol 程式設計/exists?

來自華夏公益教科書
EXISTS? target 

確定檔案或 URL 是否存在。

EXISTS? 是一個函式值。

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

原始碼

[編輯 | 編輯原始碼]
exists?: func [
  "Determines if a file or URL exists." 
  target [file! url!] 
  /local ret
][
  either error? try [
    target: make port! target 
    query target
  ] [false] [found? target/status]
]
華夏公益教科書