Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

ApSaveDBaseFile()

Save a widget database as an external file

Synopsis:

#include <Ap.h>

int ApSaveDBaseFile( ApDBase_t const *db,
                     char const *path );

Arguments:

dbase
A pointer to a widget database that you opened with either ApOpenDBase() or ApOpenDBaseFile().
path
The name of the file in which you want to save the database.

Library:

Ap

Description:

ApSaveDBaseFile() saves a widget database as an external file. Both internally bound widget databases and previously loaded external widget databases can be saved as external files.

Returns:

0
Success.
-1
Failure.

Examples:

/* Open a PhAB picture database, delete my_icon, 
   and save the database again. */
ApDBase_t        *my_dbase;

my_dbase = ApOpenDBaseFile( "/home/me/mydbase.wgtp" );

ApDeleteDBWidget( my_dbase, "my_icon" );

ApSaveDBaseFile( my_dbase, "/home/me/mydbase.wgtp" );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApCloseDBase(), ApCopyDBWidget(), ApDeleteDBWidget(), ApOpenDBase(), ApOpenDBaseFile()

Accessing PhAB Modules from Code chapter of the Photon Programmer's Guide