Last modified on 31 October 2012, at 11:53

REBOL Programming/info?

USAGE:Edit

INFO? target 

DESCRIPTION:Edit

Returns information about a file or url.

INFO? is a function value.

ARGUMENTS:Edit

  • target -- (Type: file url)

(SPECIAL ATTRIBUTES)Edit

  • catch

SOURCE CODEEdit

info?: func [
    "Returns information about a file or url." 
    [catch] 
    target [file! url!]
][
    throw-on-error [
        target: make port! target 
        query target
    ] 
    either none? target/status [
        none
    ] [
        make object! [
            size: target/size date: target/date type: target/status
        ]
    ]
]