save_data

(ReachRSS >= 0.91)
save_data -- Saves updated data to the default data file or to the specified filename

Description

boolean save_data ( [ string filename ] )

Saves updated data to the file specified by the filename parameter, or from the filename specified by calling data_filename() before calling save_data(), or from the filename you specified when calling load_data(), or if none of these have been set, then the default filename "reachrss.dat" is used.

If nothing has changed since the last call to load_data() or save_data() then save_data() will return true without actually performing the save.

This function is called automatically after update_all_channels(), add_channel(), remove_channel(), and the output() and save() functions. In short, normally saves are performed automatically, but if you've updated some settings manually or called update_channel(), you'll want to call save_data() to save your changes to disk.

Returns true on success, or false on failure (eg: the specified file does not exist or is not writable).

Example 1. save_data() example

$ReachRSS = new ReachRSS();
$Success = $ReachRSS->save_data("/path/to/data/filename.dat");

This example will instruct ReachRSS to save any updated data to /path/to/data/filename.dat.

See also data_filename(), load_data(), update_all_channels(), add_channel(), remove_channel(), output(), save(), update_channel()

Back to Function List

 

Home | Features | Samples | Demo | Download | Register | Help / Support