Opening a B Tree File

#include "btree.h"

BTA* btopn(char* fid, int mode, int shared);

The btopn function will open an existing B Tree file. The parameter fid must be set to the name of the file to open. The mode parameter determines if the B Tree file can be updated. A value of zero indicates that updates are allowed, a non-zero value will prohibit updates. The parameter shared should be set to zero to disallow shared access to the B Tree file, or non-zero to allow shared access.

btopn will return a pointer to the BT activation context for the newly opened file (BTA*), or NULL in the case of an error. To determine the cause of an error, invoke the btcerr function.

If the B Tree index file has been successfully opened, the default root is selected, and the file is ready for further operations.