Library Version 18.1.40

DbStream::size()
Prev | Chapter 14. External Files | Next

## DbStream::size()

    #include <db_cxx.h>

    int
    DbStream::size(Dbt *data, db_off_t *size, u_int32_t flags);

The `DbStream::size()` method returns the size of the external file in bytes.

Unless otherwise specified, the `DbStream::size()` 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

#### size

The size parameter references memory into which the size of the external file is copied.

#### flags

The flags parameter must be set to 0.

### Errors

The `DbStream::size()` 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

DbStream

### See Also

External Files and Related Methods

Prev | Up | Next
DbStream::read() | Home | DbStream::write()