Last modified on 27 October 2012, at 22:13

REBOL Programming/dir?

USAGE:Edit

DIR? target 

DESCRIPTION:Edit

Returns TRUE if a file or URL is a directory.

DIR? is a function value.

ARGUMENTSEdit

  • target -- (Type: file url)

(SPECIAL ATTRIBUTES)Edit

  • catch

SOURCE CODEEdit

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]
]