Rebol 程式設計/dir?
外觀
DIR? target
如果檔案或 URL 是目錄,則返回 TRUE。
DIR? 是一個函式值。
- 目標 -- (型別:檔案 URL)
- 捕捉
dir?: func [
"Returns TRUE if a file or URL is a directory."
[catch]
target [file! url!]
/local info
][
info: throw-on-error [info? target]
either none? info [false] [info/type = 'directory]
]