Rebol Programming/info?

From Wikibooks, open books for an open world
< Rebol Programming
Jump to navigation Jump to search

USAGE:[edit | edit source]

INFO? target 

DESCRIPTION:[edit | edit source]

Returns information about a file or url.

INFO? is a function value.

ARGUMENTS:[edit | edit source]

  • target -- (Type: file url)

(SPECIAL ATTRIBUTES)[edit | edit source]

  • catch

SOURCE CODE[edit | edit source]

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