REBOL Programming/save

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

USAGE:[edit]

SAVE where value /header header-data /bmp /png /all 

DESCRIPTION:[edit]

Saves a value or a block to a file or url.

SAVE is a native value.

ARGUMENTS[edit]

  • where -- Where to save it. (Type: file url binary)
  • value -- Value to save. (Type: any)

REFINEMENTS[edit]

  • /header -- Save it with a header
    • header-data -- Header block or object (Type: block object)
  • /bmp -- Save in .BMP format
  • /png -- Save in .PNG format
  • /all -- Save in serialized format

SOURCE CODE[edit]

save: native[
    "Saves a value or a block to a file or url." 
    where [file! url! binary!] "Where to save it." 
    value "Value to save." 
    /header "Save it with a header" 
    header-data [block! object!] "Header block or object" 
    /bmp "Save in .BMP format" 
    /png "Save in .PNG format" 
    /all "Save in serialized format"
]