Rebol Programming/size?

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

USAGE:[edit | edit source]

SIZE? target 

DESCRIPTION:[edit | edit source]

Returns the size of a file or URL's contents.

SIZE? is a function value.

ARGUMENTS[edit | edit source]

  • target -- (Type: file url)

(SPECIAL ATTRIBUTES)[edit | edit source]

  • catch

SOURCE CODE[edit | edit source]

size?: func [
    "Returns the size of a file or URL's contents." 
    target [file! url!] 
    /local info
    info: throw-on-error [info? target] 
    either none? info [none] [info/size]