Db::get_create_dir()
Prev | Chapter 2. The Db Handle | Next

## Db::get_create_dir()

    #include <db_cxx.h>

    int
    Db::get_create_dir(const char **dirp);

Determine which directory a database file will be created in or was found in.

The `Db::get_create_dir()` method may be called at any time.

The `Db::get_create_dir()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

#### dirp

The dirp will be set to the directory specified in the call to Db::set_create_dir() method on this handle or to the directory that the database was found in after Db::open() has been called.

### Errors

The `Db::get_create_dir()` method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

#### EINVAL

An invalid flag value or parameter was specified.

### Class

Db

### See Also

Database and Related Methods

Prev | Up | Next
Db::get_cachesize() | Home | Db::get_dbname()