REBOL Document

Save - Function Summary


Summary:

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

Usage:

save where value

Arguments:

where - Where to save it. (must be: file url binary)

value - Value to save.

Refinements:

/header - Save it with a header

header-data - Header block or object (must be: block object)

/bmp - Save in .BMP format

/png - Save in .PNG format

/all - Save in serialized format

Description:

Performs the appropriate conversion and formatting to preserve datatypes. For instance, if the value is a REBOL block, it will be saved as a REBOL script that, when loaded, will be identical.


 save %date.r now
 print read %date.r
 9-Mar-2004/1:00:11-8:00


 date: load %date.r
 print date
 9-Mar-2004/1:00:11-8:00


 save %data.r reduce ["Data" 1234 %filename now/time]
 print read %data.r
 "Data" 1234 %filename 1:00:11


 probe load %data.r
 ["Data" 1234 %filename 1:00:11
 ]

Related:

load - Loads a file, URL, or string. Binds words to global context.
send - Send a message to an address (or block of addresses)

AltStyle によって変換されたページ (->オリジナル) /