next up previous contents
Next: Creating and Playing samples: Up: A Manual for SAWDUST Previous: Displaying and Removing Objects:   Contents

Subsections

Data Input/Output: save, restore, write, read

These commands allow you to save the work you've started, or retrive previously saved work.

save Save objects to a binary file
restore Restore objects from a binary file
write Write objects to a text file
read Read objects saved in a text file

save and restore are used as a pair; likewise with write and read.

The save and restore commands

The save command saves all the objects you've defined in your current Sawdust session. The restore command reloads the objects you saved using the save command.

The data are saved to a binary file, which is compact, and can be read quickly by Sawdust. However, this file cannot be edited by a text editor: you cannot use vi (or any other text editor) to edit this file.

*    save                                   # type the 'save' command
save file name:mydata                       # Sawdust asks for a filename 

*                                           # return to the Sawdust prompt
*    save                                   # another 'save' command 
save file name:mydata                        
save file already exists; do you wish to overwrite it?y   

*

As show in the example above, Sawdust will ask for confirmation before overwriting an existing save file.

*    restore                                # type the 'restore' command
save file name:data                         # Sawdust asks for a filename
data is not a save file                     # file 'data' was not found

*    restore                                # try restore again.
save file name:mydata

*                                           # the data has been restored

The write and read commands

The write and read commands function in the same way as the save and restore commands, except that the objects are written to a text file, that can be read and edited by a text editor.


next up previous contents
Next: Creating and Playing samples: Up: A Manual for SAWDUST Previous: Displaying and Removing Objects:   Contents
Arun Chandra 2001-05-18